[CSHARP-3014] System.IndexOutOfRangeException: Reading IPv4 address, expected 4 bytes Created: 14/Mar/20  Updated: 16/Mar/20  Resolved: 16/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: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windos 10



 Description   

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
---> System.IndexOutOfRangeException: Reading IPv4 address, expected 4 bytes.
at DnsClient.DnsDatagramReader.ReadIPAddress()
at DnsClient.DnsRecordFactory.GetRecord(ResourceRecordInfo info)
at DnsClient.DnsMessageHandler.GetResponseMessage(ArraySegment`1 responseData)
at DnsClient.DnsUdpMessageHandler.Query(IPEndPoint server, DnsRequestMessage request, TimeSpan timeout)
at DnsClient.LookupClient.ResolveQuery(IReadOnlyCollection`1 servers, DnsMessageHandler handler, DnsRequestMessage request, Boolean useCache, LookupClientAudit continueAudit)
— End of inner exception stack trace —
at DnsClient.LookupClient.ResolveQuery(IReadOnlyCollection`1 servers, DnsMessageHandler handler, DnsRequestMessage request, Boolean useCache, LookupClientAudit continueAudit)
at DnsClient.LookupClient.QueryInternal(IReadOnlyCollection`1 servers, DnsQuestion question, Boolean useCache)
at DnsClient.LookupClient.Query(String query, QueryType queryType, QueryClass queryClass)
at MongoDB.Driver.Core.Misc.DnsClientWrapper.ResolveSrvRecords(String service, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Clusters.DnsMonitor.Monitor()" }.



 Comments   
Comment by Jeffrey Yemin [ 16/Mar/20 ]

Duplicates CSHARP-2015.

Comment by Michael Conrad [ 15/Mar/20 ]

This might also be related to this issue https://github.com/MichaCo/DnsClient.NET/issues/51

and #CSHARP-2968

Would be great if you could try upgrading DnsClient to v1.3.0 (beta) and try with that?

Generated at Wed Feb 07 21:44:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.