Connection Error


#1

When I run my app in Node I get this error:

Error: connect ECONNREFUSED 127.0.0.1:27017
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)

I’m certainly a newbie at this, my app is part of an online web dev bootcamp. Is this error due to something in my code or is this a server error?


#2

Hey @TimArsen :smiley:,

Is your project open, may you share the workspace URL?

Also did you choose the node.js template when making your workspace?
See the docs on Node C9 workspaces here:

Sometimes C9 like certain server settings in place to run various servers like Node or Django for example.

Best,
Mike


#3

Here’s the workspace:

https://ide.c9.io/timarsen/web-dev-bootcamp

I did select the node.js template when setting up the workspace. and all of these apps were working previously, then suddenly all of them stopped. They also stopped working while I was away, one session they were all working correctly and the next time I logged on I got this message.

It also only seems to be my apps that use MongoDB and Mongoose.


#4

Alright using the node template is the right move. Have you looked over the MongoDB C9 Docs yet just to check it over?

:books: :snail:


#5

Thanks Mike, it seems like I had an unexpected shutdown that screwed up MonogDB. Thanks for pointing me in the right direction!