[CSHARP-500] If host names in replica set connection string are aliases of the host names in the replica set config connection fails the first time Created: 15/Jun/12 Updated: 20/Mar/14 Resolved: 20/Jul/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.4.2 |
| Fix Version/s: | 1.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Craig Wilson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
To reproduce (with replica set configured with actual host names and not numeric IP addresses):
Output is:
|
| Comments |
| Comment by Craig Wilson [ 07/Aug/12 ] |
|
So, 2 things. 1) This particular bug was caused by the hostnames on the connection string not match the hostnames that the replica sets were created with. In other words, 127.0.0.1 would be on the connection string, but the replica set called itself localhost. In 1.5, this can be fixed by making sure your connection string uses the same names as the replica set knows about. You can check this by connecting to a replica set member and running rs.status(). 2) The network is inherently unreliable. I'm not surprised you are seeing "some" connections failures. "some" = a few. Do you have a stack trace and can you correlate entries in the mongodb logs with the errors? |
| Comment by David Burke [ 07/Aug/12 ] |
|
Hi We are on version 1.5 of the driver so I want to understand the original problem a little more. Why does the first connection fail? We are experiencing this problem in production at the moment but the connection failures appear to be happening intermitantly... could it be that the driver is reusing the bad connection? I have seen suggestions that recycling the app pool will clear the problem. does this make sense? |
| Comment by Craig Wilson [ 12/Jul/12 ] |
|
This bug was handled by the refactoring to support mongos loadbalancing and failover. |
| Comment by auto [ 12/Jul/12 ] |
|
Author: {u'date': u'2012-07-12T08:40:54-07:00', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}Message: |
| Comment by auto [ 12/Jul/12 ] |
|
Author: {u'date': u'2012-07-12T04:52:53-07:00', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}Message: |
| Comment by auto [ 12/Jul/12 ] |
|
Author: {u'date': u'2012-07-11T21:11:28-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |
| Comment by auto [ 12/Jul/12 ] |
|
Author: {u'date': u'2012-07-11T13:43:01-07:00', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}Message: |