[CSHARP-1059] RunCommand replSetReconfig System.IO.EndOfStreamException: Attempted to read past the end of the stream. Created: 09/Sep/14 Updated: 05/Feb/18 Resolved: 05/Feb/18 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | 1.9.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Stephen Weaver | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 8 |
||
| Issue Links: |
|
||||||||
| Description |
|
Every time the configuration is different than the previous call to replSetReconfig, RunCommand on the MongoDatabase object in the C# driver throws the following exception. at MongoDB.Bson.IO.ByteBufferFactory.LoadFrom(Stream stream) |
| Comments |
| Comment by Robert Stam [ 05/Feb/18 ] |
|
The server closed the socket which results in the reader getting an EndOfStreamException. |
| Comment by Stephen Weaver [ 10/Sep/14 ] |
|
Ok, that makes sense. Thanks for the quick response, Craig. |
| Comment by Craig Wilson [ 09/Sep/14 ] |
|
Hi Stephen, Yes, it will work. MongoDB kills the connections when a node changes from and to certain states. This manifests itself to us as an end of stream as we are expecting a reply from a command like this, but it will never come. And since we don't necessarily know what command you are running, there isn't a whole lot we can do to make this a better message. I'll leave this open to see if we can come up with something. Thanks for the report. |
| Comment by Stephen Weaver [ 09/Sep/14 ] |
|
It is interesting to note that reconfigure does work even when the exception is thrown. |