[CSHARP-3943] Problem connect AKS to mongodb Created: 01/Nov/21 Updated: 27/Oct/23 Resolved: 17/Nov/21 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavel Shapurau | Assignee: | James Kovacs |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We have application on .Net in Azure AKS. We have connect from CLI with pods, node, VM in this virtual network to private and to public link in Mongodb Atlas, but we can't connect from application in this pods. But if we expand the second node, and transfer this pod to the second node, the application works. We turn off the first node and the application does not work. We raise node 1 and transfer it to applications and the application works and connects to the Mongo database. , OperationsCountServerSelector }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [] }. |
| Comments |
| Comment by PM Bot [ 17/Nov/21 ] |
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information. |
| Comment by James Kovacs [ 02/Nov/21 ] |
|
Hi, Pavel, Thank you for explaining the issue in more detail. Based on your description this is an issue with connecting from AKS to MongoDB Atlas and is not an issue specific to the .NET/C# driver. If you are able to connect from other drivers such as our pymongo or Node.js drivers, but not from .NET/C#, that would be an indication of a .NET/C#-specific problem. Note that the legacy mongo shell does not behave exactly as our drivers do in all situations - especially more complex situations such as AKS to Atlas. Our new mongosh shell is built on top of our Node.js driver and is much more representative of how drivers should connect to MongoDB. I recommend working with our Atlas Support Team and/or community resources to troubleshoot further. If it is determined that it is a problem specific to the .NET/C# driver, then the .NET/C# team would be able to investigate further with you. Sincerely, |
| Comment by Pavel Shapurau [ 02/Nov/21 ] |
|
Hi, James Thanks for your reply. |
| Comment by James Kovacs [ 01/Nov/21 ] |
|
Hi, Pavel, Thank you for reaching out to us about your connection issue between AKS pods and MongoDB Atlas. Based on the stack traces provided, this appears to be an issue with connecting to your MongoDB Atlas replica set from AKS rather than an issue specifically with the MongoDB .NET/C# driver. You mention that you can connect from AKS pods to your MongoDB Atlas replica set using the CLI. Do you mean the old mongo command line client or the newer mongosh command line client? The new mongosh client is built on top of our Node.js driver and is a more accurate reflection of how drivers connect to the cluster. Next steps: If those fail to connect as well, we suggest troubleshooting further with our MongoDB Atlas Support Team available via "Get Help" in the Atlas UI. If you can connect via both of those methods, then this is more indicative of a problem specific to the .NET/C# driver and we will provide additional troubleshooting steps. Sincerely, |
| Comment by Pavel Shapurau [ 01/Nov/21 ] |
|
Also, the following situation may appear in the log: , OperationsCountServerSelector }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [] }. |