When trying to run: ./migrate.py -c dump -t rocketchat -d /var/rocketchat/uploads/
I get the following error:
/usr/local/lib/python3.9/dist-packages/pymongo/collection.py:1643: UserWarning: use an explicit session with no_cursor_timeout=True otherwise the cursor may still timeout after 30 minutes, for more info see https://mongodb.com/docs/v4.4/reference/method/cursor.noCursorTimeout/#session-idle-timeout-overrides-nocursortimeout return Cursor(self, *args, **kwargs) Traceback (most recent call last): File "/root/git/gridfsmigrate/./migrate.py", line 243, in <module> obj.dumpfiles("rocketchat_uploads", store) File "/root/git/gridfsmigrate/./migrate.py", line 109, in dumpfiles for upload in uploads: File "/usr/local/lib/python3.9/dist-packages/pymongo/cursor.py", line 1248, in next if len(self.__data) or self._refresh(): File "/usr/local/lib/python3.9/dist-packages/pymongo/cursor.py", line 1165, in _refresh self.__send_message(q) File "/usr/local/lib/python3.9/dist-packages/pymongo/cursor.py", line 1052, in __send_message response = client._run_operation( File "/usr/local/lib/python3.9/dist-packages/pymongo/_csot.py", line 105, in csot_wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/pymongo/mongo_client.py", line 1302, in _run_operation return self._retryable_read( File "/usr/local/lib/python3.9/dist-packages/pymongo/_csot.py", line 105, in csot_wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/pymongo/mongo_client.py", line 1414, in _retryable_read with self._socket_from_server(read_pref, server, session) as (sock_info, read_pref): File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__ return next(self.gen) File "/usr/local/lib/python3.9/dist-packages/pymongo/mongo_client.py", line 1254, in _socket_from_server with self._get_socket(server, session) as sock_info: File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__ return next(self.gen) File "/usr/local/lib/python3.9/dist-packages/pymongo/mongo_client.py", line 1189, in _get_socket with server.get_socket(handler=err_handler) as sock_info: File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__ return next(self.gen) File "/usr/local/lib/python3.9/dist-packages/pymongo/pool.py", line 1406, in get_socket sock_info = self._get_socket(handler=handler) File "/usr/local/lib/python3.9/dist-packages/pymongo/pool.py", line 1519, in _get_socket sock_info = self.connect(handler=handler) File "/usr/local/lib/python3.9/dist-packages/pymongo/pool.py", line 1377, in connect sock_info.authenticate() File "/usr/local/lib/python3.9/dist-packages/pymongo/pool.py", line 869, in authenticate auth.authenticate(creds, self) File "/usr/local/lib/python3.9/dist-packages/pymongo/auth.py", line 549, in authenticate auth_func(credentials, sock_info) File "/usr/local/lib/python3.9/dist-packages/pymongo/auth.py", line 475, in _authenticate_default return _authenticate_scram(credentials, sock_info, "SCRAM-SHA-1") File "/usr/local/lib/python3.9/dist-packages/pymongo/auth.py", line 201, in _authenticate_scram res = sock_info.command(source, cmd) File "/usr/local/lib/python3.9/dist-packages/pymongo/pool.py", line 766, in command return command( File "/usr/local/lib/python3.9/dist-packages/pymongo/network.py", line 166, in command helpers._check_command_response( File "/usr/local/lib/python3.9/dist-packages/pymongo/helpers.py", line 181, in _check_command_response raise OperationFailure(errmsg, code, response, max_wire_version) pymongo.errors.OperationFailure: Authentication failed., full error: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed', '$clusterTime': {'clusterTime': Timestamp(1662666360, 2), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}, 'operationTime': Timestamp(1662666360, 2)}
I've tested the connection using mongosh and it connects just fine. I've also tried including the "directconnection=True, connect=False" in the migrate.py line 97