[CSHARP-549] Connection string with multiple hosts will not create a valid connection Created: 24/Aug/12 Updated: 20/Mar/14 Resolved: 27/Aug/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.5 |
| Fix Version/s: | 1.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Erik Holm | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB 2.0.2 DB running on CentOs 6.0 connecting from Windows Server 2008 R2 using the C# driver version 1.5 |
||
| Issue Links: |
|
||||||||
| Description |
|
We are unable to create a connection from our web server to our DB server using a connection string in any of the formats below: mongodb://XXXUSERXXX:XXXPASSWORDXXX@T02-VM-XXXX01.vss-eng.com,XXXUSERXXX:XXXPASSWORDXXX@T02-VM-XXXX02.vss-eng.com,XXXUSERXXX:XXXPASSWORDXXX@T02-VM-XXXX03.vss-eng.com/NH_DEVICEDATA?replicaSet=NH_Data_01 mongodb://XXXUSERXXX:XXXPASSWORDXXX@ T02-VM-XXXX01.vss-eng.com:27017, T02-VM-XXXX02.vss-eng.com:27017/NH_DEVICEDATA We are trying to connect to a replica set of 3 seperate VM servers and the error we continue to recieve is: Type: MongoDB.Driver.MongoConnectionException We have not modified the 1.5 driver in any way. The replica set is correctly set up. The output of the rs.isMaster() command is below: PRIMARY> rs.isMaster() Please let us know what the issue is with the connection string capability within the Driver. |
| Comments |
| Comment by Robert Stam [ 27/Aug/12 ] |
|
Related issue |
| Comment by Robert Stam [ 24/Aug/12 ] |
| Comment by Robert Stam [ 24/Aug/12 ] |
|
The first connection string is not valid. The username/password can only appear once. The second and third connection strings appear to be syntactically valid (assuming the spaces I see are copy and paste artifacts, if not remove the spaces). It appears that there is a mismatch between the names of the hosts on the connection string and the replica set config. That could be the issue. Try making them the same. T02-VM-XXXX01.vss-eng.com vs T02-VM-XXXX01:27017 Let me know if that helps. |