On Wed, 2010-04-21 at 15:21 -0400, Rob Crittenden wrote:
> ALAHYANE Rachid wrote:
> > Here is my apache logs : 
> > ------------------------------------------------------------------------------------------------
> > ==> /var/log/httpd/error_log <==
> > [Wed Apr 21 20:02:51 2010] [warn] mod_python (pid=1529, 
> > interpreter='rpcserver.domain.org <http://rpcserver.domain.org>'): 
> > Module directory listed in "sys.path". This may cause problems. Please 
> > check code. File being imported is 
> > "/usr/lib/python2.6/site-packages/webservices/account.py".
> > [Wed Apr 21 20:02:51 2010] [notice] mod_python (pid=1529, 
> > interpreter='rpcserver.domain.org <http://rpcserver.domain.org>'): 
> > Importing module '/usr/lib/python2.6/site-packages/webservices/account.py'
> > /usr/lib/python2.6/site-packages/mod_python/importer.py:32: 
> > DeprecationWarning: the md5 module is deprecated; use hashlib instead
> >   import md5
> > ipa: ERROR: Could not create log_dir '/root/.ipa/log'
> > ipa: ERROR: could not load plugin module 
> > '/usr/lib/python2.6/site-packages/ipalib/plugins/migration.py'
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.6/site-packages/ipalib/plugable.py", line 533, 
> > in import_plugins
> >     __import__(fullname)
> >   File "/usr/lib/python2.6/site-packages/ipalib/plugins/migration.py", 
> > line 33, in <module>
> >     from ipaserver.plugins.ldap2 import ldap2
> >   File "/usr/lib/python2.6/site-packages/ipaserver/__init__.py", line 
> > 33, in <module>
> >     api.bootstrap(context='server', debug=True, log=None)
> >   File "/usr/lib/python2.6/site-packages/ipalib/plugable.py", line 380, 
> > in bootstrap
> >     self.__doing('bootstrap')
> >   File "/usr/lib/python2.6/site-packages/ipalib/plugable.py", line 365, 
> > in __doing
> >     '%s.%s() already called' % (self.__class__.__name__, name)
> > StandardError: API.bootstrap() already called
> 
> Very strange. You explicitly set the context to 'webservices' and this 
> backtrace shows it as 'server' which is why migration.py is trying to 
> load ldap2 (and blowing up).
> 
> Jason, any ideas?

Okay, took me a while to realize what's going on... in alpha2 we were
still running the server under mod_python (we have since switched to
mod_wsgi).

In alpha2, when ipaserver is imported, ipaserver/__init__.py tries to
import mod_python (which would indicate we are running under the Apache
process).  When mod_python could be imported, we always initialized IPA
for use in the server.  The worked fine for us at the time, but it
obviously causes problems when trying to use the library from another
mod_python handler.

I recommend you try working with the current code from git, where this
implied initialization has been removed:

    git clone git://git.fedorahosted.org/git/freeipa.git

I attached a script that I use to install a bunch of dependencies for
building the rpm (or srpm).

After you have these dependencies installed, you can then build and
install ipa doing something like this:

    cd freeipa
    make rpms
    yum install --nogpgcheck dist/rpms/*.rpm
    ipa-server-install


Hope this helps!

> rob

Attachment: ipa-buildrequires.sh
Description: application/shellscript

_______________________________________________
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users

Reply via email to