[JAVA-1494] got error while mongodb with teland Created: 08/Oct/14  Updated: 04/Apr/23  Resolved: 23/Jun/15

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: arun kumar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Exception in component tMongoDBInput_1
com.mongodb.MongoException: can't find a master
at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:437)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:208)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:313)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:298)
at com.mongodb.DBCursor._check(DBCursor.java:369)
at com.mongodb.DBCursor._hasNext(DBCursor.java:492)
at com.mongodb.DBCursor.hasNext(DBCursor.java:517)
at test.real_mongo_0_1.real_mongo.tMongoDBInput_1Process(real_mongo.java:937)
at test.real_mongo_0_1.real_mongo.tMongoDBRow_1Process(real_mongo.java:540)
at test.real_mongo_0_1.real_mongo.tMongoDBConnection_1Process(real_mongo.java:410)
at test.real_mongo_0_1.real_mongo.runJobInTOS(real_mongo.java:1304)
at test.real_mongo_0_1.real_mongo.main(real_mongo.java:1163)



 Comments   
Comment by Jeffrey Yemin [ 23/Jun/15 ]

As we haven't heard back from you in a while, I'm closing this issue.

Comment by Ross Lawley [ 08/Oct/14 ]

Hi arun@singh,

From the exception message it seems there has been a problem connecting to the master node in the replicaSet. Looking at your mongod logs should provide some information about the replicaSet health. Also you need to make sure your application can reach / connect to the mongod i.e. there are no firewall rules preventing access. I also noticed that the checkMaster() method is from an older version of the Java driver and the current release is 2.12.3 so if possible its advisable to keep up to date with the latest release.

For future reference, the best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a boarder audience there. This JAVA project is specifically for driver based bugs or issues.

Ross

Generated at Thu Feb 08 08:54:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.