[GODRIVER-1468] Error connecting to atlas via go driver when using 2 pods Created: 22/Jan/20  Updated: 27/Jan/20  Resolved: 27/Jan/20

Status: Closed
Project: Go Driver
Component/s: Connections
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Dhananjay Ghevde Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Go v 1.13



 Description   

 
Description in customers words.
 
GO version : 1.13
 
mongo go-driver : 1.2.1
 

  • Our go application is running on AWS-EKS. It is connecting to an Atlas instance. 
  • As long as the ReplicaSet for the deployment is set to 1, everything works as expected..
  • as soon as I change the ReplicaSet to 2 for my application deployment, the first instance (pod) of the application comes up successfully, but the second pod fails..
  • it fails on executing line
        mgo, err = mongo.NewClient(options.Client().ApplyURI(uri))
  • the value of uri is mongodb+srv://lockeradmin:XXXX@lockercluster-urwgb.mongodb.net
    I have masked the value of the password.
     
  • the error I see is..
    error parsing uri: lookup mongodb.tcp.lockercluster-urwgb.mongodb.net on 172.20.0.10:53: read udp 10.53.8.160:49134->172.20.0.10:53: i/o timeout
     
    As part of debugging this, we launched a bare busybox image on the K8s cluster, loaded it with the mongo shell and tried to connect.. it did connect to the above instance successfully.
    Strangely, I have a SECOND service that runs on the same EKS cluster connecting to the same Atlas DB. And that app is also exhibiting the same behavior.
    However, I am able to successfully run 1 instance of each of the app successfully.
     


 Comments   
Comment by Esha Bhargava [ 27/Jan/20 ]

Same as HELP-13375

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