Re: Error in Replicaset : No such host is Known

From: Kashif islam <kashif.islam.se@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Sun, 1 May 2016 10:17:00 -0700 (PDT)
Why ads?
Hi Please provide more information about your implementation of MongoDB.
What is value of write concern? what version of MongoDB are you running?


On Saturday, April 30, 2016 at 12:57:34 AM UTC+5, Rutula Sulakhe wrote:

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/91801716-7258-4317-9bd2-817ac491ac6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?