# Multi node Graylog cluster not connecting to mongodb

**URL:** <https://community.graylog.org/t/multi-node-graylog-cluster-not-connecting-to-mongodb/11770>\
**Category:** Graylog Central (peer support)\
**Created:** [August 30, 2019, 3:34pm UTC](https://community.graylog.org/t/multi-node-graylog-cluster-not-connecting-to-mongodb/11770 "2019-08-30T15:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.gavric](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@a.gavric](https://community.graylog.org/u/a.gavric)\
**Post date:** [August 30, 2019, 3:34pm UTC](https://community.graylog.org/t/multi-node-graylog-cluster-not-connecting-to-mongodb/11770/1 "2019-08-30T15:34:32Z")

</div>

Hello everyone i have been triying to fix an issue happening with graylog for a few days now so hopefully someone will be able to provide some insight as i am rather new with the software namely i have a 3 node graylog cluster with the following configurations:

node1:

> is\_master = true  
> password\_secret = set  
> root\_password\_sha2 = set  
> root\_timezone = UTC  
> http\_bind\_address = set to computers IP address  
> http\_external\_uri = set to external URI  
> mongodb\_uri = mongodb://USERNAME:PASSWORD@mongodb-node1:27017,mongodb-node2:27017,mongodb-node3:27017/gray  
> log?replicaSet=rs01

Nodes 2 and 3 have the exact same configuration files with the difference being the is\_master = false on nodes two and 3  
i have also setup a mongodb replica set with works fine and can see all three servers under one set. Now Node 1 starts fine (Node 1 is also the Graylog master and the MongoDB primary) but nodes two and 3 return this message when starting them:

> 2019-08-30T15:30:27.821Z INFO [cluster] No server chosen by WritableServerSelector from cluster description ClusterDescription{type=REPLICA\_SET, connectionMode=SINGLE, serverDescriptions=[S erverDescription{address=localhost:27017, type=REPLICA\_SET\_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[4, 0, 12]}, minWireVersion=0, maxWireVersion=7, maxDocument  
> Size=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=792117, setName=‘rs01’, canonicalAddress=node2:27017, hosts=[node1:27017,  
> node3:27017, node2:27017], passives=, arbiters=, primary=‘node1:27017’, tagSet=TagSet{}, electionId=null, s  
> etVersion=3, lastWriteDate=Fri Aug 30 15:30:27 UTC 2019, lastUpdateTimeNanos=7327288953814}]}. Waiting for 30000 ms before timing out

Important to note is that firewall is off aswell as SELinux on all three nodes at the moment and that the account with database access has only been created on the primary. Any assistance would be appreciated.

---

<div class="post-metadata">

**Author:** ![a.gavric](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@a.gavric](https://community.graylog.org/u/a.gavric)\
**Post date:** [September 1, 2019, 2:34pm UTC](https://community.graylog.org/t/multi-node-graylog-cluster-not-connecting-to-mongodb/11770/2 "2019-09-01T14:34:46Z")

</div>

Hello everyone, we can mark this as resolved, turns out my mongo\_uri was incorrectly configured.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [September 15, 2019, 2:34pm UTC](https://community.graylog.org/t/multi-node-graylog-cluster-not-connecting-to-mongodb/11770/3 "2019-09-15T14:34:48Z")

</div>

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