Unable to connect to mongodb Atlas (install python dependencies)

i went over the setup guide and now i came to the satge of adding datasource.
for me it is mognodb free tier atlas with in the whitelist.
when im entering my URI string in this format:


i get an error of “dnspython” is required.
im new to docker and ec2 but i understood that i have to change the requirements.txt file ,add pymongo[srv] and rebuild the worker(??) but i cant find the requiremnts.txt file.
please help with some simple instruction to connect to my Database.

Hey @AmitNeuhaus from my understanding you have to download it from the Official Redash Github: https://github.com/getredash/redash
If you use a different Version of Redash, you can download the source of the matching release.

In the downloaded files should be the requirements.txt where you are able to make some changes.

Then you need to build the Docker image from the path, where you’ve downloaded the source files and hope that it works. I’m not sure if you can build the Docker image only with the requirements.txt, I think you need all the files from the repository.

Hey, thanks for the quick answer.
just to make sure, i did setup my redash with ec2 with the ready redash AMI.

Because the EC2 AMI is V5.0.2 i didnt pull from redash github, but did download and extract the rar of V.5.0.2 in my instance at ubuntu/redash.
and ran

docker-compose build worker
docker-compose build server

if i should do it i run into an error on each of the builds:

if i dont need the building stage because im using the ready AMI , what shoud i do to install the additional apckages and be able to connect my mongodb atlas?

and still getting the error:

im very confused and i just want to be able to connect to my mongodb atlas with the ready AMI.
Thanks !

Can close.
Version 5.0.2 doesn’t have the pymongo srv extension in all the requirements files which are used when building the image for the containers in the AMI. This extension is required for mongo+srv string of atlas. The solution is to upgrade to docker image version greater than v5 which includes the dependency in the req files and therefore the image built with docker file is installing the dependency when building the new image. Maybe you can pull the v.5.02 tag and change the requirements files and building the compose again if you don’t wanna upgrade.

1 Like