Issue #424
closedpulp-manage-db stacks-dumps with no connection to mongodb
Description
Description of problem:
When unable to connect to the database, pulp-manage-db stack-dumps
Version-Release number of selected component (if applicable):
pulp-server-2.4.0-0.10.beta.fc20.noarch
How reproducible:
always
Steps to Reproduce:
1. mongo pulp_database --eval "db.dropDatabase()"
2. systemctl stop mongod.service
3. sudo -u apache pulp-manage-db
Actual results:
A stack dump dumped
Expected results:
Error condition properly logged by pulp-manage-db
Additional info:
- screen log
[root@ec2-54-73-48-94 pulp_auto]# systemctl stop mongod
[root@ec2-54-73-48-94 pulp_auto]# sudo -u apache pulp-manage-db
No handlers could be found for logger "pulp.server.db.connection"
Traceback (most recent call last):
File "/bin/pulp-manage-db", line 9, in <module>
load_entry_point('pulp-server==2.4.0', 'console_scripts', 'pulp-manage-db')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 30, in <module>
connection.initialize()
File "/usr/lib/python2.7/site-packages/pulp/server/db/connection.py", line 67, in initialize
_CONNECTION = pymongo.MongoClient(seeds, **connection_kwargs)
File "/usr/lib64/python2.7/site-packages/pymongo/mongo_client.py", line 337, in init
raise ConnectionFailure(str(e))
pymongo.errors.ConnectionFailure: could not connect to localhost:27017: [Errno 111] Connection refused
+ This bug was cloned from Bugzilla Bug #1093763 +
Updated by amacdona@redhat.com about 8 years ago
Appears to have been fixed from other patches.
+ This comment was cloned from Bugzilla #1093763 comment 1 +
Updated by pthomas@redhat.com about 8 years ago
Fails-qa
[root@qe-blade-13 ~]# rpm -qa pulp-server
pulp-server-2.4.1-0.8.beta.el6.noarch
[root@qe-blade-13 ~]#
The it does not dump stack trace but you will have to Ctrl+C out
[root@qe-blade-13 ~]# sudo -u apache pulp-manage-db
No handlers could be found for logger "pulp.server.db.connection"
^CTraceback (most recent call last):
File "/usr/bin/pulp-manage-db", line 9, in <module>
load_entry_point('pulp-server==2.4.0', 'console_scripts', 'pulp-manage-db')()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 30, in <module>
connection.initialize()
File "/usr/lib/python2.6/site-packages/pulp/server/db/connection.py", line 71, in initialize
time.sleep(next_delay)
KeyboardInterrupt
[root@qe-blade-13 ~]#
+ This comment was cloned from Bugzilla #1093763 comment 2 +
Updated by amacdona@redhat.com about 8 years ago
Previous fix caused pulp-manage-db to wait for mongo if the connection cannot be made. This change allows the event to be logged and printed to the console.
Fixed by https://github.com/pulp/pulp/pull/1162
+ This comment was cloned from Bugzilla #1093763 comment 3 +
Updated by cduryee about 8 years ago
fixed in pulp 2.6.0-0.2.beta
+ This comment was cloned from Bugzilla #1093763 comment 4 +
Updated by pthomas@redhat.com about 8 years ago
verified
[root@cloud-qe-4 yum.repos.d]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 yum.repos.d]#
[root@cloud-qe-4 yum.repos.d]# systemctl stop mongod.service
[root@cloud-qe-4 yum.repos.d]# 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 :
+ This comment was cloned from Bugzilla #1093763 comment 5 +
Updated by rbarlow almost 8 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE