[JAVA-740] Exception is thrown when replSetReconfig command is sent Created: 22/Jan/13 Updated: 11/Sep/19 Resolved: 22/Jan/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Cluster Management |
| Affects Version/s: | 2.10.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Alex | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
JDK 1.6 with Ubuntu 12.04 |
||
| Description |
|
Hello I am using Mongo Java Driver 2.10.1 and I am trying to reconfigure a replica set configuration by using Mongo Java Driver. Initially I have four Mongo servers started up with next configuration:
Then I have my test which tries to reconfig this replica set by sending next document:
And Java code:
And then next exception is returned:
If I go to mongo shell and I type rs.conf() at first time an errno:2 is also shown but then tries to reconnect again and then it works as expected and shows that server with id 3 is hidden. So it seems like command is send successful. Is there any way to avoid that Mongo Driver throws an exception? Maybe me as a user of Mongo Java Driver should implement a recovery function? (basically catching the exception and not propagating it?). Also I have tried by registering all servers in MongoClient but same exception is thrown. Thank you very much in advance for your help. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 22/Jan/13 ] |
|
This is expected behavior from the server since a replSetReconfig will sometimes (at this point pretty much all the time) cause all connection to be reset. The driver will reconnect automatically, after a bit. |