Timeout error: Cannot assign requested address

Saturday, April 20, 2024 4:13:44 PM
  • Posted: Tuesday, December 25, 2018 11:06 AM
  • 6
Hi team!

When I tried to install my Grandnode, I have this error:
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 : "2", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected",
Servers : [{ ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/localhost:27017" }",
EndPoint: "Unspecified/localhost:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Sockets.SocketException: Cannot assign requested address at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.ConnectAsync(Socket socket, EndPoint endPoint, CancellationToken cancellationToken) at MongoDB.Driver.Core.Connections.TcpStreamFactory.CreateStreamAsync(EndPoint endPoint, CancellationToken cancellationToken) at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelperAsync(CancellationToken cancellationToken) --- End of inner exception stack trace --- at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelperAsync(CancellationToken cancellationToken) at MongoDB.Driver.Core.Servers.ServerMonitor.HeartbeatAsync(CancellationToken cancellationToken)" }] }.

What can I do to fix this issue?
0
  • Posted: Tuesday, December 25, 2018 11:10 AM
  • 6
I had this error after having the error that it refused to connect with 127.0.0.1.
I fixed it by going to mongod.conf and change my ip_bind from 127.0.0.1 to 0.0.0.0

I hope this is not the cause
0
back to top
Filters