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
In using mlaunch to launch a replica set in order to reproduce a bug reported by a user, an unexpected failure resulted. The problem appears to originate from configuring the MongoDB servers to only bind to IPv6 addresses. It appears that mlaunch successfully launches the MongoDB servers, but then cannot connect to them on the expected localhost IPv4 address.
The command and output are:
admin@ip-10-122-9-40:~$ mlaunch init --replicaset --nodes=2 --hostname localhost --binarypath ./mongodb-linux-x86_64-enterprise-debian10-4.5.0-814-g7d2d87c/bin --dir ./rs2 --ipv6 --bind_ip ::1
launching: "./mongodb-linux-x86_64-enterprise-debian10-4.5.0-814-g7d2d87c/bin/mongod" on port 27017
launching: "./mongodb-linux-x86_64-enterprise-debian10-4.5.0-814-g7d2d87c/bin/mongod" on port 27018
Traceback (most recent call last):
File "/usr/local/bin/mlaunch", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/mtools/mlaunch/mlaunch.py", line 2068, in main
tool.run()
File "/usr/local/lib/python3.7/dist-packages/mtools/mlaunch/mlaunch.py", line 542, in run
getattr(self, self.args['command'])()
File "/usr/local/lib/python3.7/dist-packages/mtools/mlaunch/mlaunch.py", line 715, in init
self._initiate_replset(nodes[0], self.args['name'])
File "/usr/local/lib/python3.7/dist-packages/mtools/mlaunch/mlaunch.py", line 1676, in _initiate_replset
rs_status = con['admin'].command({'replSetGetStatus': 1})
File "/usr/lib/python3/dist-packages/pymongo/database.py", line 611, in command
read_preference) as (sock_info, slave_ok):
File "/usr/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/usr/lib/python3/dist-packages/pymongo/mongo_client.py", line 1099, in _socket_for_reads
server = topology.select_server(read_preference)
File "/usr/lib/python3/dist-packages/pymongo/topology.py", line 224, in select_server
address))
File "/usr/lib/python3/dist-packages/pymongo/topology.py", line 183, in select_servers
selector, server_timeout, address)
File "/usr/lib/python3/dist-packages/pymongo/topology.py", line 199, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
Here is the evidence that the severs were launched:
stennie
changed the title
Launching IPv6-only appears to confuse mtools
mlaunch: Launching IPv6-only should not try to connect via IPv4 localhost
Nov 27, 2021
In using mlaunch to launch a replica set in order to reproduce a bug reported by a user, an unexpected failure resulted. The problem appears to originate from configuring the MongoDB servers to only bind to IPv6 addresses. It appears that mlaunch successfully launches the MongoDB servers, but then cannot connect to them on the expected localhost IPv4 address.
The command and output are:
Here is the evidence that the severs were launched:
Expected behavior
mlaunch should attempt to connect to the launched servers on the configured IPv6 address.
Actual/current behavior
mlaunch only attempts to connect to the launched servers on the localhost IPv4 address, which results in a connection timeout.
Steps to reproduce the actual/current behavior
See above command and associated output.
Environment
The text was updated successfully, but these errors were encountered: