[Pulp-list] Strugling with pulp server initialization

Eric Berthiaume (External) Eric_Berthiaume.external at discovery.com
Mon Nov 2 17:31:37 UTC 2015


Hello list,

Tried searching the pulp-list, google, documentation and pushing everthing to DEBUG but been struggling for a couple of days with a pulp server issue:

Everytime I start the server I get this message.  Of course if after that i try to log in using the pulp-admin nothing works.

Server log

Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:CRITICAL: *************************************************************
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480) The Pulp server encountered an unexpected failure during initialization
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480) Traceback (most recent call last):
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 147, in wsgi_application
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     _initialize_pulp()
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 114, in _initialize_pulp
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     AgentServices.start()
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/pulp/server/agent/direct/services.py", line 35, in start
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     Services.reply_handler = ReplyHandler(url)
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/pulp/server/agent/direct/services.py", line 110, in __init__
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     queue.declare(url)
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/gofer/messaging/adapter/model.py", line 39, in _fn
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     return fn(*args, **keywords)
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/gofer/messaging/adapter/model.py", line 359, in declare
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     adapter = Adapter.find(url)
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)   File "/usr/lib/python2.6/site-packages/gofer/messaging/adapter/factory.py", line 164, in find
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480)     raise NoAdaptersLoaded()
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:ERROR: (23339-24480) NoAdaptersLoaded: No messaging adapters loaded
Nov  2 18:01:31 host1 pulp: pulp.server.webservices.application:CRITICAL: *************************************************************

Admin log
2015-11-02 17:47:51,509 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/client/extensions/core.py", line 478, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.6/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/admin_auth.py", line 58, in login
    result = self.context.server.actions.login(username, password).response_body
  File "/usr/lib/python2.6/site-packages/pulp/bindings/actions.py", line 32, in login
    return self.server.POST(path)
  File "/usr/lib/python2.6/site-packages/pulp/bindings/server.py", line 100, in POST
    log_request_body=log_request_body, ignore_prefix=ignore_prefix)
  File "/usr/lib/python2.6/site-packages/pulp/bindings/server.py", line 166, in _request
    self._handle_exceptions(response_code, response_body)
  File "/usr/lib/python2.6/site-packages/pulp/bindings/server.py", line 202, in _handle_exceptions
    raise exceptions.ApacheServerException(response_body)
ApacheServerException

Now to me (and please do correct me if I'm wrong) this would mean that pulp cannot find the message broker's url.  Nothing has changed from the apache side except the name of the servers url (along with the generated self-signed certificates).  I've also check the path and permission of webservices.wsgi

-rwxr-xr-x 1 apache apache 729 Sep 24 21:46 /srv/pulp/webservices.wsgi

I do also have these in the logs:

Nov  2 18:03:00 host1 pulp: celery.worker.consumer:INFO: Connected to qpid://guest@127.0.0.1:5672//
Nov  2 18:03:00 host1 pulp: kombu.transport.qpid:INFO: Connected to qpid with SASL mechanism ANONYMOUS

So I'm not sure what to believe...

I've tried setting up the url manually in /etc/pulp/server.conf or using the default configuration.

[messaging]
#url: tcp://localhost:5672
#url: tcp://host1:5672
#transport: qpid

[tasks]
#broker_url: qpid://host1:5672/
#celery_require_ssl: false

But nothing works.  I've executed a small python script to check on the message broker and it does work

# Import the modules we need
from qpid.messaging import *
broker     = "localhost:5672"
address    = "amq.topic"
connection = Connection(broker)
try:
    connection.open()
    # Define the session
    session = connection.session()
    # Define a sender *and* a receiver
    sender   = session.sender(address)
    receiver = session.receiver(address)
    # Send a simple "Hello world!" message to the queue
    sender.send(Message("Hello world!"));
    # Fetch the next message in the queue
    message = receiver.fetch()
    # Output the message
    print message.content
    # Check with the server
    session.acknowledge()
except MessagingError, err:
    print err
finally:
    connection.close()

NOW .... Thing is .... It working a couple of days ago:

Oct 18 03:37:08  host1 pulp: gofer.messaging.adapter.qpid.connection:INFO: connecting: URL: tcp://localhost|SSL: ca: /etc/pki/qpid/ca/ca.crt|key: None|certificate: /etc/pki/qpid/client/client.pem|host-va
lidation: False
Oct 18 03:37:08 host1 pulp: gofer.messaging.adapter.qpid.connection:INFO: connecting: URL: tcp://localhost|SSL: ca: /etc/pki/qpid/ca/ca.crt|key: None|certificate: /etc/pki/qpid/client/client.pem|host-va
lidation: False
Oct 18 03:37:08 host1 pulp: gofer.messaging.adapter.qpid.connection:INFO: connecting: URL: tcp://localhost|SSL: ca: /etc/pki/qpid/ca/ca.crt|key: None|certificate: /etc/pki/qpid/client/client.pem|host-va
lidation: False
Oct 18 03:37:08 host1 pulp: gofer.messaging.adapter.qpid.connection:INFO: connected: tcp://localhost
Oct 18 03:37:08 host1 pulp: gofer.messaging.adapter.qpid.connection:INFO: connected: tcp://localhost
Oct 18 03:37:08 host1 pulp: gofer.messaging.adapter.qpid.connection:INFO: connected: tcp://localhost
Oct 18 03:37:08 host1 pulp: pulp.server.agent.direct.services:INFO: Task reply handler, started.
Oct 18 03:37:08 host1 pulp: pulp.server.agent.direct.services:INFO: AMQP reply handler started
Oct 18 03:37:08 host1 pulp: pulp.server.webservices.application:INFO: *************************************************************
Oct 18 03:37:08 host1 pulp: pulp.server.webservices.application:INFO: The Pulp server has been successfully initialized
Oct 18 03:37:08 host1 pulp: pulp.server.webservices.application:INFO: *************************************************************

And I could log into the pulp-server and manage repo like you are supposed to.

I know it's a brick wall of text but if somebody has encountered this error.... Please do let me know.

I can also provide any (log/config) if it can help.

Thanks.

Eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20151102/f2778b11/attachment.htm>


More information about the Pulp-list mailing list