O
O
Oleg2015-12-30 17:08:11
MongoDB
Oleg, 2015-12-30 17:08:11

How to fix econnrefused error in mongoose?

Hello. Literally yesterday I wrote the code, everything worked, turned on the computer today and that's what it began to give me. I have no idea why it refuses access, maybe the default port is busy with something?
Connection
mongoose.connect('mongodb://localhost/test');
string Error string

process.nextTick(function() { throw err; })
                                      ^
Error: connect ECONNREFUSED 127.0.0.1:27017
    at Object.exports._errnoException (util.js:856:11)
    at exports._exceptionWithHostPort (util.js:879:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)

I tried to change the default port (which is 27017) to another one, but I could not change the mongo.conf file, I don’t know if this really helped or not.
Thank you for your attention.

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