All Apps and Add-ons

"not talking to master and retries used up" mongodb - splunk error

shantiestolas04
Engager

Hi,

Im having a problem connecting from splunk db connect to MongoDB replica.
I can telnet the ip of mongo replica to splunk, also tried to connect the mongo primary db and yielded successfully. But when connecting to mongo replica db, Im encountering an error "Database connection MongoDB is invalid. not talking to master and retries used up"

splunk db connect version is 3.1.4
splunk version is 7.2.3

Can you help me if there is a problem on my configuration below.

[mongo]
displayName = MongoDB
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcDriverClass = mongodb.jdbc.MongoDriver
jdbcUrlFormat = jdbc:mongo://IP:27017/dbname?replicaSet=dbname&readPreference=secondaryPreferred&connectWithNoPrimary=true&slaveOk=true
jdbcUrlSSLFormat = jdbc:mongo://IP:27017/dbname?replicaSet=dbname&readPreference=secondaryPreferred&connectWithNoPrimary=true&slaveOk=true
ui_default_catalog = dbname
port = 27017

0 Karma

umlawren
Explorer

Two things to try:

  1. List more than one server in the replica set in the URL. Example: jdbc:mongo://IP1:27017,IP2:27017/dbname?replicaSet=dbname&readPreference=secondaryPreferred&connectWithNoPrimary=true&slaveOk=true
  2. Use the alternate JDBC URL syntax jdbc:mongodb://[user:pw]@host1,host2/database?replicaSet=dbname&readPreference=secondaryPreferred&connectWithNoPrimary=true&slaveOk=true

The Mongo documentation specifies the second URL format where the first URL format is from the JDBC driver itself.

0 Karma
Get Updates on the Splunk Community!

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...

What’s New in Splunk Cloud Platform 9.1.2308?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2308! Analysts can ...