[JAVA-2610] Connecting to mongdb cloud, getting timeouts Created: 22/Sep/17 Updated: 27/Oct/23 Resolved: 03/Oct/17 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | John McCosker | Assignee: | Unassigned |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Really new to mongodb, using connect string from atlas cloud version (3.4.7) and Java driver version (mongo-java-driver-3.4.3.jar) getting this exception , caused by {java.net.ConnectException: Connection refused: connect}}, {address=duneorbit-shard-00-00-dwjjr.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception= {com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused: connect}}, {address=duneorbit-shard-00-01-dwjjr.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception= {com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused: connect}}] Code snippet: MongoClientURI uri = new MongoClientURI("mongodb://duneorbit:************@duneorbit-shard-00-00-dwjjr.mongodb.net:27017," MongoClient mongoClient = new MongoClient(uri); IP Whitelist: 193.120.236.35/32 (includes your current IP address) Active 0.0.0.0/0 (includes your current IP address) Active |
| Comments |
| Comment by Jeffrey Yemin [ 03/Oct/17 ] |
|
As we have not heard back from you in some time, we're resolving this issue for now. If you have more information in the future, please comment and we will consider reopening it. Regards, |
| Comment by Ross Lawley [ 22/Sep/17 ] |
|
The java code looks ok, but there is a connection issue: Exception opening socket. Please double check in Atlas that the cluster is running and not deploying after a configuration update. The next thing to check is can connect to the cluster via the shell? If no, it highlights that there is a general connectivity issue. If yes and you still can't connect via the Java driver - then it points to a Java driver configuration issue. Just to let you know for future reference this jira project is for Java driver bugs or feature requests. The best place for questions regarding Atlas or MongoDB usage or even Java driver specifics is the mongodb-user mailing list or stackoverflow as you will reach a boarder audience there. If your business requires an answer from MongoDB within a set time frame then we do offer production support. Ross |