Closed hdecolle closed 1 year ago
I can also spot the following error in the log:
%Mongo.Error{message: "Topology selection timeout", code: 89, host: nil, type: :network}
Hm on DigtialOcean I have the MongoDB 6.0.6 Community edition and in docker MongoDB 4.4.22 Community edition.
Could that be the problem?
A quick update:
When I did use the Mongo without pulling Ecto in, in a small demo, the error with the "non-existing-domain" disappeared. But I got a new one where there was an authentication problem.
I also did a small demo with the mongodb-driver
and there where no issues, but MongoDB 6.0 is also listed as supported there.
I will switch to that for now and will close the issue. Maybe I will look again at a later date. Using ecto would be nice.
Hi I have the setup described in the issue/379.
More details:
I have a mongodb connection string in the
mongdb+srv
format and I have trouble connection to the database on Digital Ocean.Should the
url:
as described here or themongo_url
option as described here be used.At the moment I use the
url:
option and locally it works for example when I use:mongodb://mongodb:27017/db_name
it also works withecto://mongodb:27017/db_name
NOTE: Locally everything is running in docker and
mongodb
is the name of the mongodb container.When I use the
mongodb+srv
version I get the following error:The connection string is correct because a different scala container can connect successfully to the database.
Is the
mongodb+srv
string supported? If not what would be a workaround.