[CSHARP-3015] System.IndexOutOfRangeException: Reading IPv4 address, expected 4 bytes. Created: 14/Mar/20 Updated: 18/Mar/20 Resolved: 18/Mar/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | 2.10.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Prasoon Gupta | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10. Visual Studio Community Version 2019 |
||
| Description |
|
Hi, I am able to connect from Compass and perform all CRUD operations on collection. However, I am getting below exception when doing insert using .Net driver. I have also tested by "Allow from Anywhere" option in IP Whitelisting but that doesn't work either.
Here is my connection string "mongodb+srv://mongodb-user:password@my-production-i5mve.mongodb.net/?retryWrites=true&w=majority&ssl=true&connect=replicaSet"
I also tried by adding/removing options in connection string. e.g. removing connect=replicaSet etc. But nothing worked.
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector { AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [], DnsMonitorException : "DnsClient.DnsResponseException: Unhandled exception |
| Comments |
| Comment by Dmitry Lukyanov (Inactive) [ 18/Mar/20 ] |
|
prasoon@metalbrain.in, we will update the version of DnsClient in the next release. kletterer@web.de, thank you for your participation. |
| Comment by Prasoon Gupta [ 18/Mar/20 ] |
|
Hi Michael, Upgrading DnsClient to v1.3.0 worked. Thanks for the help |
| Comment by Prasoon Gupta [ 17/Mar/20 ] |
|
Hi Michael, This issue only occurs while I use my internet connection at home. I could not try your suggestion so far but I will give you an update today because I am working from home due to Covid19. |
| Comment by Michael Conrad [ 15/Mar/20 ] |
|
Did you see my comment on your 2nd issue reporting the same problem? Here again: — This might also be related to this issue https://github.com/MichaCo/DnsClient.NET/issues/51 and # Would be great if you could try upgrading DnsClient to v1.3.0 (beta) and try with that? — Did you try that?
Regarding your last comment, that's probably not helping, you most likely have 2 different DNS servers sending different responses and one of them sends somehting DnsClient cannot handle. Again, I'm pretty sure that'll be fixed in 1.3.0 of DnsClient, if you could try that out that would help me a lot. Thanks!
|
| Comment by Prasoon Gupta [ 15/Mar/20 ] |
|
I am not sure the exact problem but it is definitely related to what network I use. I tested by connection it to my mobile's hot-spot and it worked. But when I again switched to broadband connection and it fails. Hope it helps someone. |
| Comment by Prasoon Gupta [ 14/Mar/20 ] |
|
It was working fine till yesterday and I have not changed anything but suddenly it stopped working. |