Saturday, May 12, 2018

How to Fix Mongodb OPS Manager Failure to connect to configured mongo instance

yesterday i'm having a problem after my mongoops server is dead, mongodb-mms service is not working, here's the error:

Failure to connect to configured mongo instance: Config{loadBalance=false, encryptedCredentials=false, ssl='false', dbNames='[mmsdb, mmsdbprovisionlog, mmsdbautomation, mmsdbserverlog, mmsdbpings, mmsdbprofile, mmsdbrrd, mmsdbconfig, mmsdblogcollection, mmsdbjobs, mmsdbagentlog, mmsdbbilling, backuplogs, automationcore, monitoringstatus, mmsdbautomationlog, automationstatus, cloudconf, backupdb, mmsdbprovisioning, mmsdbqueues]', uri=mongodb://127.0.0.1:27017/?maxPoolSize=150} Error: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
Pre-flight checks failed. Service can not start.


After server is turned on, i try to run mongodb-mms service with this comment :

[root@siskom]# service mongodb-mms start

and i have this error

Check Ops Manager status
   Probing instance 0...[FAILED]
      The instance is not running.
Check Backup Daemon status[FAILED]
   Backup Daemon is not running.

How to Fix Mongodb OPS Manager Failure to connect to configured mongo instance

 the error says that "service backup daemon" is not running yet, and I try to run a "backup daemon" with this comment:

[root@siskom]# service mongodb-mms-backup-daemon start

and i have this error

Starting pre-flight checks
Failure to connect to configured mongo instance: Config{loadBalance=false, encryptedCredentials=false, ssl='false', dbNames='[mmsdb, mmsdbprovisionlog, mmsdbautomation, mmsdbserverlog, mmsdbpings, mmsdbprofile, mmsdbrrd, mmsdbconfig, mmsdblogcollection, mmsdbjobs, mmsdbagentlog, mmsdbbilling, backuplogs, automationcore, monitoringstatus, mmsdbautomationlog, automationstatus, cloudconf, backupdb, mmsdbprovisioning, mmsdbqueues]', uri=mongodb://127.0.0.1:27017/?maxPoolSize=150} Error: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
Pre-flight checks failed. Service can not start.


How to Fix Mongodb OPS Manager Failure to connect to configured mongo instance

after a while looking for a solution, it was quite easy to overcome the problem. You just need to run mongod service on your server.
before start mongod service, make sure that mongod service is completely dead, if service mongod not dead means this is not the solution.


How to Fix Mongodb OPS Manager Failure to connect to configured mongo instance

to run mongod service follow this comment:

[root@siskom]# service mongod start

How to Fix Mongodb OPS Manager Failure to connect to configured mongo instance

after service mongod running try running mongodb-mms service again:

[root@siskom]# service mongodb-mms start

How to Fix Mongodb OPS Manager Failure to connect to configured mongo instance


Does It Work For You?

please comment below if you find another error.
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post