You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This case does not work, and I don't really understand why:
{ MongoNetworkError: failed to connect to server [y.y.y.y:27017] on first connect [MongoNetworkError: connection timed out]
at Pool.<anonymous> (/Volumes/Work/test/mongo/node_modules/mongodb-core/lib/topologies/server.js:431:11)
at Pool.emit (events.js:182:13)
at connect (/Volumes/Work/test/mongo/node_modules/mongodb-core/lib/connection/pool.js:557:14)
at makeConnection (/Volumes/Work/test/mongo/node_modules/mongodb-core/lib/connection/connect.js:39:11)
at callback (/Volumes/Work/test/mongo/node_modules/mongodb-core/lib/connection/connect.js:261:5)
at Socket.err (/Volumes/Work/test/mongo/node_modules/mongodb-core/lib/connection/connect.js:286:7)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at Socket._onTimeout (net.js:453:8)
at ontimeout (timers.js:436:11)
name: 'MongoNetworkError',
errorLabels: [ 'TransientTransactionError' ],
[Symbol(mongoErrorContextSymbol)]: {} }
I have exactly the same issue with Studio 3T: it works fine on one server but fails when I add two servers (timeout)
I have some more clues doing it with command line:
MongoDB shell version v4.0.3
connecting to: mongodb://proxy:27017,proxy:27018/?replicaSet=rs0
2019-06-12T14:31:36.272-0400 I NETWORK [js] Starting new replica set monitor for rs0/proxy:27017,proxy:27018
2019-06-12T14:31:36.848-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to proxy:27017 (1 connections now open to proxy:27017 with a 5 second timeout)
2019-06-12T14:31:36.855-0400 I NETWORK [js] Successfully connected to proxy:27018 (1 connections now open to proxy:27018 with a 5 second timeout)
2019-06-12T14:31:37.079-0400 I NETWORK [js] changing hosts to rs0/x.x.x.x:27017,y.y.y.y:27017 from rs0/proxy:27017,proxy:27018
2019-06-12T14:31:52.590-0400 W NETWORK [js] Unable to reach primary for set rs0
2019-06-12T14:31:52.590-0400 I NETWORK [js] Cannot reach any nodes for set rs0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2019-06-12T14:31:52.599-0400 E QUERY [js] Error: connect failed to replica set rs0/proxy:27017,proxy:27018 :
connect@src/mongo/shell/mongo.js:257:13
@(connect):1:6
exception: connect failed
The problem is that the connection is changing hosts to IP addresses that are not reachable directly (internal kubernetes ips) .
The text was updated successfully, but these errors were encountered:
I have created a mongodb replicaset on kubernetes.
This is the result of
rs.status()
:For example if I try to establish a connection with nodejs:
it works prefectly
This works as well
This case does not work, and I don't really understand why:
I have exactly the same issue with Studio 3T: it works fine on one server but fails when I add two servers (timeout)
I have some more clues doing it with command line:
The result is
The problem is that the connection is
changing hosts to
IP addresses that are not reachable directly (internal kubernetes ips) .The text was updated successfully, but these errors were encountered: