1. Describe your incident:
Everything looks nice:
2023-03-08T13:41:01.063-05:00 INFO [cluster] Monitor thread successfully connected to server with description ServerDescription{address=FIRST:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=17, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=20604162, setName='rs0', canonicalAddress=PRIMARYGUY:27017, hosts=[SECONDARY1:27021, PRIMARYGUY:27017, SECONDARY2:27022], passives=[], arbiters=[], primary='SECONDARY1:27021', tagSet=TagSet{[]}, electionId=null, setVersion=5, topologyVersion=TopologyVersion{processId=6408d689b8c28e96ad630057, counter=4}, lastWriteDate=Wed Mar 08 13:40:52 EST 2023, lastUpdateTimeNanos=11421634809451}
And then it doesnt:
2023-03-08T13:41:01.065-05:00 ERROR [cluster] Expecting replica set member from set 'rs0,mongodb://SECONDARY1:27021/graylog?replicaSet=rs0,mongodb://SECONDARY2:27022/graylog?replicaSet=rs0', but found one from set 'rs0'. Removing PRIMARYGUY:27017 from client view of cluster.
I need help interpreting whats going on here.
2. Describe your environment:
-
OS Information:
Rocky 8 -
Package Version:
graylog-server-5.0.2-1.x86_64
mongodb-org-server-6.0.4-1.el8.x86_64 -
Service logs, configurations, and environment variables:
Here’s how I started all my mongos:
mongod --port 27017 --dbpath /var/lib/mongo --replSet rs0 --bind_ip PRIMARYGUY
mongod --port 27021 --dbpath /var/lib/mongo --replSet rs0 --bind_ip SECONDARY1
mongod --port 27022 --dbpath /var/lib/mongo --replSet rs0 --bind_ip SECONDARY2
Heres my graylog server.conf mongo uri line for replicas:
# Use a replica set instead of a single host
mongodb_uri = mongodb://PRIMARYGUY:27017/graylog?replicaSet=rs0,mongodb://SECONDARY1:27021/graylog?replicaSet=rs0,mongodb://SECONDARY2:27022/graylog?replicaSet=rs0
and tried:
# Use a replica set instead of a single host
mongodb_uri = mongodb://PRIMARYGUY:27017/graylog?replicaSet=rs0,SECONDARY1:27021/graylog?replicaSet=rs0,SECONDARY2:27022/graylog?replicaSet=rs0
And mongosh’d into PRIMARYGUY shows the set is named rs0… and that all 3 buddies are members!
3. What steps have you already taken to try and solve the problem?
I tried all varieties of mongo uri lines (removed mongodb:// and remoed the replicaSet param…), but graylog sometimes starts up and sometimes doesnt, and at any rate, delivers a new error around the mongos.
4. How can the community help?
Mainly I need to know why “Removing PRIMARYGUY:27017 from client view of cluster.” this is happening after it appears to start up successfully knowing the replica set name.
Am I not supposed to specify “/graylog?replicaSet=rs0” for every server or something?