# Tutor connection with amazondocumentdb

**URL:** <https://discuss.openedx.org/t/tutor-connection-with-amazondocumentdb/9264>\
**Category:** Tutor Help\
**Created:** [February 1, 2023, 6:38am UTC](https://discuss.openedx.org/t/tutor-connection-with-amazondocumentdb/9264 "2023-02-01T06:38:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viresh\_Kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/viresh_kumar/32/3619_2.png) [@Viresh\_Kumar](https://discuss.openedx.org/u/Viresh_Kumar)\
**Post date:** [February 1, 2023, 6:38am UTC](https://discuss.openedx.org/t/tutor-connection-with-amazondocumentdb/9264/1 "2023-02-01T06:38:36Z")

</div>

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](http://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](http://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](http://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

---

<div class="post-metadata">

**Author:** ![Viresh\_Kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/viresh_kumar/32/3619_2.png) [@Viresh\_Kumar](https://discuss.openedx.org/u/Viresh_Kumar)\
**Post date:** [February 2, 2023, 7:24am UTC](https://discuss.openedx.org/t/tutor-connection-with-amazondocumentdb/9264/2 "2023-02-02T07:24:42Z")

</div>

this issue resolved by changing setting in documentdb parametre group
