Graylog docker did not connect to MongoDB docker

Well that’s of course an issue: all three need to be in the same replica set. You should not have run rs.initiate() on the third node, you should have configured it to join the existing replica set and then tell the primary in the set to pull the third node into the cluster.

1 Like

I solved the replica set problem. Now all servers are connected.
But I can’t still up graylog. The message below doesn’t stop logging.

No server chosen by WritableServerSelector from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=mongo:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[4, 0, 5]}, minWireVersion=0, maxWireVersion=7, maxDocumentSize=16777216, roundTripTimeNanos=2103842, setName=‘graylog_sistemas’, canonicalAddress=drjscgerlx042:27017, hosts=[server-3:27017, server-2:27017, server-1:27017], passives=, arbiters=, primary=‘server-1:27017’, tagSet=TagSet{}, electionId=null, setVersion=7, lastWriteDate=Wed Feb 20 13:14:38 BRT 2019, lastUpdateTimeNanos=1892669806706407}]}. Waiting for 30000 ms before timing out

I’ve already tested connecting to mongo via all servers with user and password created to admin de dbs. But I’ve found this message on log.

Query failed with error code 13 and error message ‘command find requires authentication’ on server mongo:27017

Is there any other permission that I have to configure to solve this issue?

1 Like

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