hi, thanks for your great support, my problem is: I am trying to connect my application on Azure to my MongoDB atlas database hosting for MongoDB, I put everything is wright, and give this error down, but when publishing and install from my localhost its run good and create a database but not continue running, and fall down could you help me .
Note: my MongoDB atlas Clusters is Azure
REGION
Azure / Virginia (eastus2)
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 : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/shahbander-shard-00-00-yv0jr.azure.mongodb.net:27017" }", EndPoint: "Unspecified/shahbander-shard-00-00-yv0jr.azure.mongodb.net:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server. ---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at MongoDB.Driver.Core.Misc.StreamExtensionMethods.ReadBytesAsync(Stream stream, IByteBuffer buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveBufferAsync()
--- End of inner exception stack trace ---
at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveBufferAsync()
at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveBufferAsync(Int32 responseTo, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveMessageAsync(Int32 responseTo, IMessageEncoderSelector encoderSelector, MessageEncoderSettings messageEncoderSettings, CancellationToken cancellationToken)
at MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1.ExecuteAsync(IConnection connection, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.IsMasterHelper.GetResultAsync(IConnection connection, CommandWireProtocol`1 isMasterProtocol, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.ConnectionInitializer.InitializeConnectionAsync(IConnection connection, 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)" }] }.
A timeout occured after 30000ms selecting a server using CompositeServerSelector
Monday, November 25, 2024 4:00:21 PM
Hello,
It's related with MongoDB connection error. Probably you don't have permissions or you didn't specify the allowed IPs in MongoDB. Please check for example in MongoDB Compose if you are able to connect with your MongoDB Atlas. If you won't be able to connect, that means that you have wrong MongoDB connection string.
Best,
Patryk
It's related with MongoDB connection error. Probably you don't have permissions or you didn't specify the allowed IPs in MongoDB. Please check for example in MongoDB Compose if you are able to connect with your MongoDB Atlas. If you won't be able to connect, that means that you have wrong MongoDB connection string.
Best,
Patryk
Best regards,
Patryk
GrandNode Team
Patryk
GrandNode Team
0
Are you using a connection string to connect? May want to try.
RE: https://stackoverflow.com/questions/31314245/a-timeout-occured-after-30000ms-selecting-a-server-using-compositeserverselector
If there's a firewall in the middle and you are connecting from a remote host, have you permitted remote connections?
Is your MongoDB set up for user and pass based authentication? Are you referencing the right auth db after creating a privelleged account for said db?
RE: https://stackoverflow.com/questions/31314245/a-timeout-occured-after-30000ms-selecting-a-server-using-compositeserverselector
If there's a firewall in the middle and you are connecting from a remote host, have you permitted remote connections?
Is your MongoDB set up for user and pass based authentication? Are you referencing the right auth db after creating a privelleged account for said db?
0
I have little knowledge of clustering MongoDB on Azure, but potentially something to do with the nodes "stepping down" :
https://stackoverflow.com/questions/46447883/mongodb-write-concern-majority-attempted-to-read-past-the-end-of-the-stream
I'll spare you the rest of my blind search.
https://stackoverflow.com/questions/46447883/mongodb-write-concern-majority-attempted-to-read-past-the-end-of-the-stream
I'll spare you the rest of my blind search.
0