A
A
Artur Galyaev2020-04-24 19:19:20
Node.js
Artur Galyaev, 2020-04-24 19:19:20

How to fix Error: querySrv EREFUSED _mongodb._tcp.cluster0-tp55j.mongodb.net?

How to fix db connection error on mongo db?
The server is on Firebase, no error occurs on the local server.

Error: querySrv EREFUSED _mongodb._tcp.cluster0-tp55j.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:196:19)

Connected via Mongoose

await mongoose.connect('mongodb+srv://{login}:{password}@cluster0-tp55j.mongodb.net/app?retryWrites=true&w=majority', {
        useNewUrlParser: true,
        useUnifiedTopology: true,
        useCreateIndex: true
 })

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question