Ops Manager installation: Invalid replica set configuration: at least 3 nodes required

Hi
I’m working on an installation of Ops Manager 5.0 with MongoDB 4.2 backing db.
MongoDB has been setup with 3 replication nodes.

[dkshans@fdbdmcnmomp01 ~]$ mongo mongodb://fdbdmcnfadd01:27017/fluxa --eval 'rs.status()' | egrep 'name|stateStr'
"name" : "fdbdmcnfadd01.example.org:27017",
"stateStr" : "PRIMARY",
"name" : "fdbdmcnfadd02.example.org:27017",
"stateStr" : "SECONDARY",
"name" : "fdbdmcnfadd03,example,org:27017",
"stateStr" : "SECONDARY",
...

Then when I try the installation it fails:

[root@fdbdmcnmomp01 ~]# service mongodb-mms start
Starting pre-flight checks
[WARNING] Running MongoDB Ops Manager with version 4.2.19 is deprecated: Config{loadBalance=false, encryptedCredentials=false, ssl='false', dbNames='[mmsdbserverlog, mmsdbautomation, monitoringdiagnostics, mmsdbpings, mmsdbprofile, mmsdbjobs, monitoringstatus, automationcore, agentlogs, automationstatus, mmsdbserverlessrrd, chartsmetadata, mmsdb, mmsdbprovisionlog, mmsrt, mmsdbrrd, mmsdbconfig, mmsdblogcollection, mongologsmetadata, backupusage, mmsdbagentlog, mmsdbbilling, backupstatus, backuplogs, mmsdbmetering, mmsdbautomationlog, ndsstatus, cloudconf, backupdb, mmsdbprovisioning, mmsdbqueues, nds]', uri=mongodb://fdbdmcnfadd01.example.org:27017/?maxPoolSize=150&retryWrites=false&retryReads=false}
[WARNING] Version 4.4.0 will be required in a future release.
Invalid replica set configuration: at least 3 nodes required: Config{loadBalance=false, encryptedCredentials=false, ssl='false', dbNames='[mmsdbserverlog, mmsdbautomation, monitoringdiagnostics, mmsdbpings, mmsdbprofile, mmsdbjobs, monitoringstatus, automationcore, agentlogs, automationstatus, mmsdbserverlessrrd, chartsmetadata, mmsdb, mmsdbprovisionlog, mmsrt, mmsdbrrd, mmsdbconfig, mmsdblogcollection, mongologsmetadata, backupusage, mmsdbagentlog, mmsdbbilling, backupstatus, backuplogs, mmsdbmetering, mmsdbautomationlog, ndsstatus, cloudconf, backupdb, mmsdbprovisioning, mmsdbqueues, nds]', uri=mongodb://fdbdmcnfadd01.example.org:27017/?maxPoolSize=150&retryWrites=false&retryReads=false}
Pre-flight checks failed. Service can not start.
Preflight check failed.

Config is simple:

[root@fdbdmcnmomp01 ~]# egrep -v "^#|^$" /opt/mongodb/mms/conf/conf-mms.properties
mongo.mongoUri=mongodb://fdbdmcnfadd01.example.org:27017/?maxPoolSize=150&retryWrites=false&retryReads=false
mongo.ssl=false
jvm.java.security.krb5.conf=
jvm.java.security.krb5.kdc=
jvm.java.security.krb5.realm=
mms.kerberos.principal=
mms.kerberos.keyTab=
mms.kerberos.debug=

Any hint is much appreciated!

best regards
Hans

Your secondary has comma separated name instead dot
Please check hostname again

Please read Formatting code and log snippets in posts and post the complete output of rs.status(). Some clues might be present in the grep-ed out part.

Hi Steeve

Here is rs.status() complete.

[dkshans@fdbdmcnmomp01 ~]$ mongo mongodb://fdbdmcnfadd01:27017/fluxa --eval 'rs.status()'
MongoDB shell version v4.2.19
connecting to: mongodb://fdbdmcnfadd01:27017/fluxa?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("ee14d6f7-8b38-4609-b5c8-bfc7f46c8058") }
MongoDB server version: 4.2.19
{
        "set" : "rs0",
        "date" : ISODate("2022-04-12T12:27:35.772Z"),
        "myState" : 1,
        "term" : NumberLong(3),
        "syncingTo" : "",
        "syncSourceHost" : "",
        "syncSourceId" : -1,
        "heartbeatIntervalMillis" : NumberLong(2000),
        "majorityVoteCount" : 2,
        "writeMajorityCount" : 2,
        "optimes" : {
                "lastCommittedOpTime" : {
                        "ts" : Timestamp(1649766451, 1),
                        "t" : NumberLong(3)
                },
                "lastCommittedWallTime" : ISODate("2022-04-12T12:27:31.152Z"),
                "readConcernMajorityOpTime" : {
                        "ts" : Timestamp(1649766451, 1),
                        "t" : NumberLong(3)
                },
                "readConcernMajorityWallTime" : ISODate("2022-04-12T12:27:31.152Z"),
                "appliedOpTime" : {
                        "ts" : Timestamp(1649766451, 1),
                        "t" : NumberLong(3)
                },
                "durableOpTime" : {
                        "ts" : Timestamp(1649766451, 1),
                        "t" : NumberLong(3)
                },
                "lastAppliedWallTime" : ISODate("2022-04-12T12:27:31.152Z"),
                "lastDurableWallTime" : ISODate("2022-04-12T12:27:31.152Z")
        },
        "lastStableRecoveryTimestamp" : Timestamp(1649766451, 1),
        "lastStableCheckpointTimestamp" : Timestamp(1649766451, 1),
        "electionCandidateMetrics" : {
                "lastElectionReason" : "stepUpRequestSkipDryRun",
                "lastElectionDate" : ISODate("2022-04-12T05:53:20.346Z"),
                "electionTerm" : NumberLong(3),
                "lastCommittedOpTimeAtElection" : {
                        "ts" : Timestamp(1649742794, 1),
                        "t" : NumberLong(2)
                },
                "lastSeenOpTimeAtElection" : {
                        "ts" : Timestamp(1649742794, 1),
                        "t" : NumberLong(2)
                },
                "numVotesNeeded" : 2,
                "priorityAtElection" : 1,
                "electionTimeoutMillis" : NumberLong(10000),
                "priorPrimaryMemberId" : 1,
                "numCatchUpOps" : NumberLong(0),
                "newTermStartDate" : ISODate("2022-04-12T05:53:20.351Z"),
                "wMajorityWriteAvailabilityDate" : ISODate("2022-04-12T05:53:22.358Z")
        },
        "members" : [
                {
                        "_id" : 0,
                        "name" : "fdbdmcnfadd01.example.org:27017",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 356490,
                        "optime" : {
                                "ts" : Timestamp(1649766451, 1),
                                "t" : NumberLong(3)
                        },
                        "optimeDate" : ISODate("2022-04-12T12:27:31Z"),
                        "syncingTo" : "",
                        "syncSourceHost" : "",
                        "syncSourceId" : -1,
                        "infoMessage" : "",
                        "electionTime" : Timestamp(1649742800, 1),
                        "electionDate" : ISODate("2022-04-12T05:53:20Z"),
                        "configVersion" : 1,
                        "self" : true,
                        "lastHeartbeatMessage" : ""
                },
                {
                        "_id" : 1,
                        "name" : "fdbdmcnfadd02.example.org:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 23649,
                        "optime" : {
                                "ts" : Timestamp(1649766451, 1),
                                "t" : NumberLong(3)
                        },
                        "optimeDurable" : {
                                "ts" : Timestamp(1649766451, 1),
                                "t" : NumberLong(3)
                        },
                        "optimeDate" : ISODate("2022-04-12T12:27:31Z"),
                        "optimeDurableDate" : ISODate("2022-04-12T12:27:31Z"),
                        "lastHeartbeat" : ISODate("2022-04-12T12:27:35.126Z"),
                        "lastHeartbeatRecv" : ISODate("2022-04-12T12:27:35.126Z"),
                        "pingMs" : NumberLong(0),
                        "lastHeartbeatMessage" : "",
                        "syncingTo" : "fdbdmcnfadd03.example.org:27017",
                        "syncSourceHost" : "fdbdmcnfadd03.example.org:27017",
                        "syncSourceId" : 2,
                        "infoMessage" : "",
                        "configVersion" : 1
                },
                {
                        "_id" : 2,
                        "name" : "fdbdmcnfadd03.example.org:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 356489,
                        "optime" : {
                                "ts" : Timestamp(1649766451, 1),
                                "t" : NumberLong(3)
                        },
                        "optimeDurable" : {
                                "ts" : Timestamp(1649766451, 1),
                                "t" : NumberLong(3)
                        },
                        "optimeDate" : ISODate("2022-04-12T12:27:31Z"),
                        "optimeDurableDate" : ISODate("2022-04-12T12:27:31Z"),
                        "lastHeartbeat" : ISODate("2022-04-12T12:27:35.127Z"),
                        "lastHeartbeatRecv" : ISODate("2022-04-12T12:27:35.126Z"),
                        "pingMs" : NumberLong(0),
                        "lastHeartbeatMessage" : "",
                        "syncingTo" : "fdbdmcnfadd01.example.org:27017",
                        "syncSourceHost" : "fdbdmcnfadd01.example.org:27017",
                        "syncSourceId" : 0,
                        "infoMessage" : "",
                        "configVersion" : 1
                }
        ],
        "ok" : 1,
        "$clusterTime" : {
                "clusterTime" : Timestamp(1649766451, 1),
                "signature" : {
                        "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                        "keyId" : NumberLong(0)
                }
        },
        "operationTime" : Timestamp(1649766451, 1)
}

Here is a log snippet generated on PRIMARY during “service mongodb-mms start”

2022-04-12T14:41:14.185+0200 I  NETWORK  [listener] connection accepted from 10.42.26.136:32856 #1191 (10 connections now open)
2022-04-12T14:41:14.202+0200 I  NETWORK  [conn1191] received client metadata from 10.42.26.136:32856 conn1191: { driver: { name: "mongo-java-driver|legacy", version: "3.11.2" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "5.4.17-2136.305.5.3.el8uek.x86_64" }, platform: "Java/Eclipse Adoptium/11.0.14.1+1" }
2022-04-12T14:41:14.239+0200 I  NETWORK  [listener] connection accepted from 10.42.26.136:32858 #1192 (11 connections now open)
2022-04-12T14:41:14.240+0200 I  NETWORK  [conn1192] received client metadata from 10.42.26.136:32858 conn1192: { driver: { name: "mongo-java-driver|legacy", version: "3.11.2" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "5.4.17-2136.305.5.3.el8uek.x86_64" }, platform: "Java/Eclipse Adoptium/11.0.14.1+1" }
2022-04-12T14:41:14.338+0200 I  NETWORK  [listener] connection accepted from 10.42.26.136:32860 #1193 (12 connections now open)
2022-04-12T14:41:14.341+0200 I  NETWORK  [conn1193] received client metadata from 10.42.26.136:32860 conn1193: { driver: { name: "mongo-java-driver|legacy", version: "3.11.2" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "5.4.17-2136.305.5.3.el8uek.x86_64" }, platform: "Java/Eclipse Adoptium/11.0.14.1+1" }
2022-04-12T14:41:14.355+0200 I  NETWORK  [listener] connection accepted from 10.42.26.136:32862 #1194 (13 connections now open)
2022-04-12T14:41:14.356+0200 I  NETWORK  [conn1194] received client metadata from 10.42.26.136:32862 conn1194: { driver: { name: "mongo-java-driver|legacy", version: "3.11.2" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "5.4.17-2136.305.5.3.el8uek.x86_64" }, platform: "Java/Eclipse Adoptium/11.0.14.1+1" }
2022-04-12T14:41:14.572+0200 I  NETWORK  [listener] connection accepted from 10.42.26.136:32864 #1195 (14 connections now open)
2022-04-12T14:41:14.573+0200 I  NETWORK  [conn1195] received client metadata from 10.42.26.136:32864 conn1195: { driver: { name: "mongo-java-driver|legacy", version: "3.11.2" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "5.4.17-2136.305.5.3.el8uek.x86_64" }, platform: "Java/Eclipse Adoptium/11.0.14.1+1" }
2022-04-12T14:41:14.589+0200 I  NETWORK  [listener] connection accepted from 10.42.26.136:32866 #1196 (15 connections now open)
2022-04-12T14:41:14.589+0200 I  NETWORK  [conn1196] received client metadata from 10.42.26.136:32866 conn1196: { driver: { name: "mongo-java-driver|legacy", version: "3.11.2" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "5.4.17-2136.305.5.3.el8uek.x86_64" }, platform: "Java/Eclipse Adoptium/11.0.14.1+1" }
2022-04-12T14:41:14.645+0200 I  NETWORK  [conn1196] end connection 10.42.26.136:32866 (14 connections now open)
2022-04-12T14:41:14.648+0200 I  NETWORK  [conn1195] end connection 10.42.26.136:32864 (13 connections now open)
2022-04-12T14:41:14.670+0200 I  NETWORK  [conn1193] end connection 10.42.26.136:32860 (11 connections now open)
2022-04-12T14:41:14.670+0200 I  NETWORK  [conn1192] end connection 10.42.26.136:32858 (10 connections now open)
2022-04-12T14:41:14.670+0200 I  NETWORK  [conn1194] end connection 10.42.26.136:32862 (12 connections now open)
2022-04-12T14:41:14.670+0200 I  NETWORK  [conn1191] end connection 10.42.26.136:32856 (9 connections now open)

The only thing I can see here is that you could try to replace

in your configuration file with

mongo.mongoUri=mongodb://fdbdmcnfadd01.example.org,fdbdmcnfadd02.example.org,fdbdmcnfadd03.example.org,/...

See https://www.mongodb.com/docs/manual/reference/connection-string/ for replica set URI.

Oh, it works!
I didn’t know I should write all the db-servers. I thought it just connected to one and from there got the other two servers.
I must have missed that in the installation guide.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.