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
+ python3 -m mtools.mlaunch.mlaunch --dir /tmpfs/db --binarypath /opt/mongodb/bin --setParameter enableTestCommands=1 --setParameter acceptApiVersion2=1 --setParameter diagnosticDataCollectionEnabled=false --replicaset --name test-rs --nodes 2 --arbiter --auth --username bob --password pwd123
/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py:362: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if (LooseVersion(self.current_version) >= LooseVersion("4.2.0")):
/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py:669: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if (LooseVersion(self.current_version) >= LooseVersion("3.3.0") or
Generating keyfile: /tmpfs/db/keyfile
launching: "/opt/mongodb/bin/mongod" on port 27017
launching: "/opt/mongodb/bin/mongod" on port 27018
launching: "/opt/mongodb/bin/mongod" on port 27019
replica set 'test-rs' initialized.
waiting for primary to add a user.
Traceback (most recent call last):
File "/opt/python37/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/python37/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 2226, in <module>
sys.exit(main())
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 2222, in main
tool.run()
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 620, in run
getattr(self, self.args['command'])()
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 826, in init
if self._wait_for_primary():
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 1918, in _wait_for_primary
serverSelectionTimeoutMS=30000)
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 936, in client
return MongoConnection(host_and_port, **kwargs)
File "/opt/python37/lib/python3.7/site-packages/mtools-1.7.1.dev0-py3.7.egg/mtools/mlaunch/mlaunch.py", line 60, in __init__
Connection.__init__(self, *args, **kwargs)
File "/opt/python37/lib/python3.7/site-packages/pymongo/mongo_client.py", line 753, in __init__
_check_options(seeds, opts)
File "/opt/python37/lib/python3.7/site-packages/pymongo/uri_parser.py", line 391, in _check_options
raise ConfigurationError("Cannot specify multiple hosts with directConnection=true")
pymongo.errors.ConfigurationError: Cannot specify multiple hosts with directConnection=true
/home/w/apps/ruby-driver/spec/shared/lib/mrss/docker_runner.rb:168:in `run_command': Process exited with code 1 (RuntimeError)
from /home/w/apps/ruby-driver/spec/shared/lib/mrss/docker_runner.rb:117:in `run_tests'
from /home/w/apps/ruby-driver/spec/shared/lib/mrss/docker_runner.rb:33:in `run'
from ./.evergreen/test-on-docker:11:in `<main>'
As far as I can tell what happens is that mlaunch has this hack to add directConnection to MongoClient constructions:
class MongoConnection(Connection):
"""
MongoConnection class.
Wrapper around Connection (itself conditionally a MongoClient or
pymongo.Connection) to specify timeout and directConnection.
"""
def __init__(self, *args, **kwargs):
kwargs.setdefault('directConnection', True)
kwargs.setdefault('serverSelectionTimeoutMS', 1)
# Set client application name for MongoDB 3.4+ servers
kwargs['appName'] = f'''mlaunch v{__version__}'''
Connection.__init__(self, *args, **kwargs)
This hack is employed when waiting for replica set, which passes the list of all hosts to the constructor. Subsequently mlaunch tries to request direct connection to 3 nodes at the same time which pymongo rejects.
Expected behavior
The invocation above to create a replica set with auth.
Actual/current behavior
mlaunch fails to create the deployment.
Steps to reproduce the actual/current behavior
See the command quoted above.
Environment
Software
Version
mtools
master
Python
3.7
MongoDB server
5.0
Operating system
Debian Linux testing
The text was updated successfully, but these errors were encountered:
I am trying to launch a replica set with auth:
As far as I can tell what happens is that mlaunch has this hack to add directConnection to MongoClient constructions:
This hack is employed when waiting for replica set, which passes the list of all hosts to the constructor. Subsequently mlaunch tries to request direct connection to 3 nodes at the same time which pymongo rejects.
Expected behavior
The invocation above to create a replica set with auth.
Actual/current behavior
mlaunch fails to create the deployment.
Steps to reproduce the actual/current behavior
See the command quoted above.
Environment
The text was updated successfully, but these errors were encountered: