GrandNode Install via web application: Not connecting to local mongoDb

Thursday, April 25, 2024 8:06:55 AM
  • Posted: Tuesday, January 8, 2019 6:41 AM
  • 2
I downloaded GrandNode with source code and added the published version to IIS. Seems to be working but needs to "install.
I then downloaded mongodb msi and installed it. However, I am struggling to connect GrandNode to my mongodb.

I am very new to mongodb and grandnode. I probably missed someting. Can someone help?

Exception:
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/bernard:27017" }", EndPoint: "Unspecified/bernard:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No connection could be made because the target machine actively refused it [fe80::c8b0:a41f:82ba:5c7d%14]:27017
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.<>c__DisplayClass7_0.<ConnectAsync>b__2()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
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)" }] }.
0
  • Posted: Tuesday, January 8, 2019 12:51 PM
  • 953
Hello,

Please use the localhost as a server, not bernard. I think it's the reason. Port is ok, 27017 is default MongoDB port.
Best regards,
Patryk

GrandNode Team
-1
  • Posted: Tuesday, January 8, 2019 5:01 PM
  • 55
Bernard,

Walk me through your mongo install and configuration steps and I'll try to fill in any gaps.

What i found useful was using the Mongo connection string instead. Which would have been something along the lines of:

mongodb://mydbuser:mydbuserpass@127.0.0.1:27017/mygrandnodedb
0
  • Posted: Wednesday, January 9, 2019 5:12 AM
  • 2
Hi Bill,
Thank you for offering to help.
For my mongodb connection string I used my computer name instead of the local ip address.
As soon as I replaced the domain name [computer name] with my local ip address [127.0.01] it installed.
I guess the domain name failed to resolve to the local ip....google search for another day :)

As background:
1. I created mongodb database/user with cmd line as prescribed by mongodb documentation.
2. Published GrandNode to IIS.
3. Browsed to the the local GrandNode url.
4. Provided "installation" details of which the connection string was part of.
5. After changing domain name to local ip it worked.
1
back to top
Filters