Bug 1127846 - pulp-manage-db doesn't set up logging early enough
Summary: pulp-manage-db doesn't set up logging early enough
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: 2.4 Beta
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 2.6.0
Assignee: pulp-bugs
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 16:48 UTC by Randy Barlow
Modified: 2015-06-23 06:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:14:42 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Pulp Redmine 483 None None None Never

Description Randy Barlow 2014-08-07 16:48:29 UTC
We had a user today who has some exception happening early on during pulp-manage-db. We aren't sure what the exception is because it happens before pulp-manage-db sets up logging. This led to this error message on stderr:

No handler could be found for logger "pulp.server.db.connection"

Here are steps to reproduce:

1) Stop mongod (service mongod stop)

2) Run pulp-manage-db

3) Observe that pulp-manage-db seems to hang forever, and prints this message to the screen: 'No handler could be found for logger "pulp.server.db.connection"'

We should fix it so that the user is given an informative message that Mongo can't be reached, and pulp-manage-db should exit.

To verify that this bug is fixed:

1) Stop mongod (service mongod stop)

2) Run pulp-manage-db

3) Observe the pulp-manage-db exits, and prints a useful error message.

Comment 1 amacdona@redhat.com 2014-11-17 21:48:18 UTC
This has been fixed by several commits over the last couple of months which will be included in 2.6.

Comment 2 Chris Duryee 2014-12-23 20:53:09 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 3 Irina Gulina 2014-12-26 02:12:35 UTC
>> rpm -qa | grep pulp-server
pulp-server-2.6.0-0.2.beta.el6.noarch


>> service mongod stop
Stopping mongod:                                           [  OK  ]

>> sudo -u apache pulp-manage-db
Could not connect to MongoDB at localhost:27017:
Cannot connect to database default :
could not connect to localhost:27017: [Errno 111] Connection refused
... Waiting 1 seconds and trying again.
Could not connect to MongoDB at localhost:27017:
Cannot connect to database default :
could not connect to localhost:27017: [Errno 111] Connection refused
... Waiting 1 seconds and trying again.
Could not connect to MongoDB at localhost:27017:
Cannot connect to database default :
could not connect to localhost:27017: [Errno 111] Connection refused
... Waiting 1 seconds and trying again.


>> service mongod start
Starting mongod:                                           [  OK  ]

>>sudo -u apache pulp-manage-db
Mongo database for connection is version 2.4.12
Loading content types.
....
Database migrations complete.

Comment 4 Brian Bouterse 2015-02-28 22:14:42 UTC
Moved to https://pulp.plan.io/issues/483


Note You need to log in before you can comment on or make changes to this bug.