Resurrecting this thread, because the problem is getting me again.

If I go through the python interpreter and import the code that calls the ipalib, and then manually call it myself the way the webserver does, the code works. If the same code is run in the course of the web server process, I get the error:

Traceback (most recent call last):
line 670, in respond
    response.body = self.handler()
line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "freeipa_community_portal/", line 39, in POST
    errors =
  File "freeipa_community_portal/model/", line 33, in save
  File "freeipa_community_portal/model/", line 45, in _call_api
  File "/usr/lib/python2.7/site-packages/ipalib/", line 439, in 
    ret =*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/", line 755, in run
    return self.forward(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/", line 776, in 
    return self.Backend.rpcclient.forward(, *args, **kw)
  File "/usr/lib/python2.7/site-packages/ipalib/", line 880, in forward
    command = getattr(self.conn, name)
  File "/usr/lib/python2.7/site-packages/ipalib/", line 97, in 
__get_conn, threading.currentThread().getName())
AttributeError: no context.rpcclient in thread 'CP Server Thread-6'

The error shows up whether the server is run from within the python interpreter or by itself.

I kinit and have a TGT from the IPA server. The client machine is registered with the IPA server. When I run the commands "by hand", an HTTP ticket can be seen in the klist. When I run the webserver, no HTTP ticket is ever recieved, so the code is failing on the client side before it even gets to the server.

Which is obviously not what should be happening. It's the same error I got when I was using Flask, and now I'm using cherrypy and it's still broken. Could this have something to do with the web server being a multithreaded environment?

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA:

Reply via email to