jesuspaletaHOBBY
10 months ago
I'm running a Python API and everything is working correctly except the MongoDB connection. I always get this error:
localhost:27017: [Errno 111] Connection refused (configured timeouts: socketTimeoutMS: 20000.0ms
My code runs correctly in local environment, I have a MONGOURI environment var that calls for MONGOPRIVATEURL, I have also tried MONGOURL but it is the same error.
0 Replies
10 months ago
as per your logs - [localhost:27017](localhost:27017)
meaning you are not using the mongo client correctly, please refer to its documentation on how to use a url with it.