Tutor connection with amazondocumentdb

Hello ,

I have configured mongo as per documentation .
“RUN_MONGODB”: false,
“MONGODB_DATABASE”: “openedx”,
“MONGODB_HOST”: “”,
“MONGODB_PASSWORD”: “”,
“MONGODB_PORT”: 27017,
“MONGODB_USERNAME”: “”,
“MONGODB_USE_SSL”: true,
“MONGODB_REPLICA_SET”: “”,
“MONGODB_AUTH_MECHANISM”: “”,
“MONGODB_AUTH_SOURCE”: “”,
I kept blank MONGODB_REPLICA_SET , MONGODB_AUTH_MECHANISM, MONGODB_AUTH_SOURCE and set host username password from amazon documentdb. getting error as mentioned below.

Applying split_modulestore_django.0002_data_migration…Traceback (most recent call last):
File “./manage.py”, line 106, in
execute_from_command_line([sys.argv[0]] + django_args)
File “/openedx/venv/lib/python3.8/site-packages/django/core/management/init.py”, line 419, in execute_from_command_line
utility.execute()
File “/openedx/venv/lib/python3.8/site-packages/django/core/management/init.py”, line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py”, line 354, in run_from_argv
self.execute(*args, **cmd_options)
File “/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py”, line 398, in execute
output = self.handle(*args, **options)
File “/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py”, line 89, in wrapped
res = handle_func(*args, **kwargs)
File “/openedx/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py”, line 244, in handle
post_migrate_state = executor.migrate(
File “/openedx/venv/lib/python3.8/site-packages/django/db/migrations/executor.py”, line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/openedx/venv/lib/python3.8/site-packages/django/db/migrations/executor.py”, line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “/openedx/venv/lib/python3.8/site-packages/django/db/migrations/executor.py”, line 227, in apply_migration
state = migration.apply(state, schema_editor)
File “/openedx/venv/lib/python3.8/site-packages/django/db/migrations/migration.py”, line 123, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File “/openedx/venv/lib/python3.8/site-packages/django/db/migrations/operations/special.py”, line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File “/openedx/edx-platform/common/djangoapps/split_modulestore_django/migrations/0002_data_migration.py”, line 24, in forwards_func
split_modulestore = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.split)
File “/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/django.py”, line 319, in modulestore
contentstore(),
File “/openedx/edx-platform/common/lib/xmodule/xmodule/contentstore/django.py”, line 29, in contentstore
CONTENTSTORE[name] = class(**options)
File “/openedx/edx-platform/common/lib/xmodule/xmodule/contentstore/mongo.py”, line 44, in init
mongo_db = connect_to_mongodb(
File “/openedx/edx-platform/common/lib/xmodule/xmodule/mongo_utils.py”, line 72, in connect_to_mongodb
mongo_conn.authenticate(user, password, source=auth_source)
File “/openedx/venv/lib/python3.8/site-packages/pymongo/database.py”, line 1687, in authenticate
self.client._cache_credentials(self.name, credentials, connect=True)
File “/openedx/venv/lib/python3.8/site-packages/pymongo/mongo_client.py”, line 825, in _cache_credentials
server = self._get_topology().select_server(writable_preferred_server_selector)
File “/openedx/venv/lib/python3.8/site-packages/pymongo/topology.py”, line 250, in select_server
return random.choice(self.select_servers(selector, server_selection_timeout, address))
File “/openedx/venv/lib/python3.8/site-packages/pymongo/topology.py”, line 211, in select_servers
server_descriptions = self._select_servers_loop(selector, server_timeout, address)
File “/openedx/venv/lib/python3.8/site-packages/pymongo/topology.py”, line 226, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: docdb-2023-01-31-14-04-20.cbbefiych2yk.ap-south-1.docdb.amazonaws.com:27017: timed out, Timeout: 30s, Topology Description: <TopologyDescription id: 63da06cd449ff749898bd94b, topology_type: Single, servers: [<ServerDescription (‘docdb-2023-01-31-14-04-20.cbbefiych2yk.ap-south-1.docdb.amazonaws.com’, 27017) server_type: Unknown, rtt: None, error=NetworkTimeout(‘docdb-2023-01-31-14-04-20.cbbefiych2yk.ap-south-1.docdb.amazonaws.com:27017: timed out’)>]>
Error: Command failed with status 1: docker compose -f /home/ubuntu/BTF-prod/edx-tutor/envtutor/env/local/docker-compose.yml -f /home/ubuntu/BTF-prod/edx-tutor/envtutor/env/local/docker-compose.prod.yml -f /home/ubuntu/BTF-prod/edx-tutor/envtutor/env/local/docker-compose.tmp.yml --project-name tutor_local -f /home/ubuntu/BTF-prod/edx-tutor/envtutor/env/local/docker-compose.jobs.yml -f /home/ubuntu/BTF-prod/edx-tutor/envtutor/env/local/docker-compose.jobs.tmp.yml run --rm lms-job sh -e -c dockerize -wait tcp://btf-proddb.cbbefiych2yk.ap-south-1.rds.amazonaws.com:3306 -timeout 20s
dockerize -wait tcp://docdb-2023-01-31-14-04-20.cbbefiych2yk.ap-south-1.docdb.amazonaws.com:27017 -timeout 20s

this issue resolved by changing setting in documentdb parametre group