Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
joe86
Contributor
Contributor

Reading from MongoDB secondary server

Hi,

I am using "replica set address" to connect to mongoDB using tMongoDBInput. I have given the "Set read preference" option as "secondary" to fetch from MongoDB secondary server. But, I am getting the below exception:

" Exception in component tMongoDBInput_2

com.mongodb.CommandFailureException: { "serverUsed" : "xxxxxxxxxx.abcd.local:27017" , "ok" : 0.0 , "errmsg" : "not master and slaveOk=false" , "code" : 13435 , "codeName" : "NotMasterNoSlaveOk"}

      at com.mongodb.CommandResult.getException(CommandResult.java:76)

      at com.mongodb.CommandResult.throwOnError(CommandResult.java:140)

      at com.mongodb.DBCollectionImpl.aggregate(DBCollectionImpl.java:113)

      at com.mongodb.DBCollection.aggregate(DBCollection.java:1814) "

 

Can you please let me know how to fix this issue and suggest any thoughts on this?

Server details in above exception is dummy.

Labels (3)
1 Reply
Anonymous
Not applicable

Hello,

Can you please clarify in which Talend version/edition you are? What's MongoDB version are you using?

Best regards

Sabrina