RHUA server starting fails with an error "pymongo.errors.AutoReconnect: could not find master/primary"

Solution Verified - Updated -

Issue

RHUA server was shutdown during network outage. After restarting the server, pulp-server deamon did not start automatically at boot. Trying to initialize causing below errors.

# /etc/init.d/pulp-server restart
Stopping httpd:                                            [FAILED]
Stopping Qpid AMQP daemon:                                 [  OK  ]
Pulp database not initialized, please run: /etc/init.d/pulp-server init

Trying to run '/etc/init.d/pulp-server init' command

# /etc/init.d/pulp-server init
Starting mongod:                                           [  OK  ]
Traceback (most recent call last):
  File "/usr/bin/pulp-migrate", line 19, in <module>
    from pulp.server.db.migrate import script
  File "/usr/lib/python2.6/site-packages/pulp/server/db/migrate/script.py", line 26, in <module>
    connection.initialize()
  File "/usr/lib/python2.6/site-packages/pulp/server/db/connection.py", line 47, in initialize
    _connection = pymongo.Connection(seeds)
  File "/usr/lib64/python2.6/site-packages/pymongo/connection.py", line 305, in __init__
    self.__find_master()
  File "/usr/lib64/python2.6/site-packages/pymongo/connection.py", line 509, in __find_master
    raise AutoReconnect("could not find master/primary")
pymongo.errors.AutoReconnect: could not find master/primary

Environment

  • Red Hat Update Infrastructure all versions

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content