-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Background: I was connecting to a mongodb.com instance using ipython at first but then I starting using djongo (which using pymongo) with django. Using the same creds this does not work.
These are the lib versions that I am using:
- django 2.2.10
- djongo 1.2.3
- pymongo 3.12.0
Settings.py file in django project
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': ENV('MONGO_DBNAME'),
'ENFORCE_SCHEMA': False,
'CLIENT': {
'host': ENV("MONGO_HOST"),
# 'port': int(ENV("MONGO_DBPORT")),
'username': ENV("MONGO_USER"),
'password': ENV("MONGO_PASS"),
'authSource': ENV('MONGO_DBNAME'),
'authMechanism': 'SCRAM-SHA-1',
"waitQueueTimeoutMS": 60000, # how many milsec to wait for timeout
"ssl": True,
},
'LOGGING': {
'version': 1,
'loggers': {
'djongo': {
'level': 'DEBUG',
'propagate': False,
}
},
},
}
{color:#d4d4d4}}
Full Error:
pymongo.errors.ServerSelectionTimeoutError: [Errno 8] nodename nor servname provided, or not known, Timeout: 30s, Topology Description: <TopologyDescription id: 6124052c370971661d43d6bf, topology_type: Single, servers: [<ServerDescription (server_type: Unknown, rtt: None, error=AutoReconnect([Errno 8] nodename nor servname provided, or not known')>]>
- is duplicated by
-
PYTHON-2876 "pymongo.errors.ServerSelectionTimeoutError:" error from using djongo engine
- Closed