Connect to mongoDb

i have uri
to mongo Atlas database

when i try to add database with
host -
port - 27017
database/user/password - relevant data

i get this error

com.mongodb.MongoTimeoutException: Timed out after 3000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=jjj:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: jjj}, caused by { jjj}}]

where jjjj is my provided host

what do i do wrong?

Similar issue (related to Atlas free tier it seems), I’m not using it myself.

Here’s link to current final post where one person seem to have worked around:

1 Like