Error in Replicaset : No such host is Known

From: Rutula Sulakhe <rutula.sulakhe@xxxxxxxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Fri, 29 Apr 2016 06:33:13 -0700 (PDT)
Why ads?
Hi,

I am facing this issue while bulk.execute on a mongodb replicaset with 1 
primary and 2 secondaries.
I am migrating data every half hour into these mongo server, every cycle I 
face this issue, The error get solved once I restart the migrating service.
I have checked the hosts entries, no issue with it.


The Error is as follows: 

MongoDB.Driver.MongoConnectionException: Unable to connect to a member of 
the replica set matching the read preference Primary: No such host is 
known. ---> System.Net.Sockets.SocketException: No such host is known at 
System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String 
hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String 
hostNameOrAddress) at MongoDB.Driver.MongoServerAddress.ToIPEndPoint(AddressFamily 
addressFamily) at MongoDB.Driver.MongoServerInstance.GetIPEndPoint() at 
MongoDB.Driver.Internal.MongoConnection.Open() at MongoDB.Driver.Internal.
MongoConnection.SendMessage(BsonBuffer buffer, Int32 requestId) at 
MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage 
message) at MongoDB.Driver.Operations.CommandOperation`1.Execute(MongoConnection 
connection) at MongoDB.Driver.MongoServerInstance.
RunCommandAs[TCommandResult](MongoConnection connection, String 
databaseName, IMongoCommand command) at MongoDB.Driver.
MongoServerInstance.Ping(MongoConnection connection) at MongoDB.Driver.MongoServerInstance.Connect() 
at MongoDB.Driver.Internal.MultipleInstanceMongoServerPro
xy.<>c__DisplayClassd.b__c(Object _) --- End of inner exception stack trace 
--- at MongoDB.Driver.Internal.MultipleInstanceMongoServerPro
xy.ThrowConnectionException(ReadPreference readPreference) at 
MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.Connect(TimeSpan 
timeout, ReadPreference readPreference) at MongoDB.Driver.Internal.
MultipleInstanceMongoServerProxy.ChooseServerInstance(ReadPreference 
readPreference) at MongoDB.Driver.Internal.DiscoveringMongoServerProxy.
ChooseServerInstance(ReadPreference readPreference) at 
MongoDB.Driver.MongoServer.AcquireConnection(ReadPreference readPreference) 
at MongoDB.Driver.MongoCollection.BulkWrite(BulkWriteArgs args) at 
MongoDB.Driver.BulkWriteOperation.ExecuteHelper(WriteConcern writeConcern) 
at MongoDB.Driver.BulkWriteOperation.Execute(WriteConcern writeConcern) 


Regards,
Rutula Sulakhe.

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/cc610c4a-35b2-4b1a-9d87-e4a80bb3b400%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?