failed to connect to server [localhost:27017] on fisrt connect

28 views
Skip to first unread message

Fabrice Mpenge

unread,
Feb 14, 2017, 10:04:43 AM2/14/17
to Mongoose Node.JS ODM
Hi falks,

I'm a new node.js developer, using MongoDB. So I use mongoose to connect to my DB.
At the begining everything gone well, sometimes ago when I start a project things run well, but 
once I put my pc on stand by or if I let workin' on the project for a time; when I come back and
I try to run again the project I get an error such as  show on the screen shot in attach.

I tried to found many solutions online (stackoverflow, gitHub,...); people often talk about commands such as : 
Kill , Killall, taskkill, Killtree,...

But all those commands those not work for me. 

Is there anyone to help me?? Soon one week that I got this issue.

Thanks




node.png

Richard Bateman

unread,
Feb 14, 2017, 4:10:16 PM2/14/17
to mongoo...@googlegroups.com
To ask the obvious question first: if you then try just running
"mongo" does it connect?

Richard
> --
> Documentation - http://mongoosejs.com/
> Plugins - http://plugins.mongoosejs.com/
> Bug Reports - http://github.com/learnboost/mongoose
> Production Examples - http://mongoosejs.tumblr.com/
> StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
> Google Groups -
> https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
> Twitter - https://twitter.com/mongoosejs
> IRC - #mongoosejs
> ---
> You received this message because you are subscribed to the Google Groups
> "Mongoose Node.JS ODM" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongoose-orm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Fabrice Mpenge

unread,
Feb 15, 2017, 2:52:06 AM2/15/17
to mongoo...@googlegroups.com
Hi Richard,

Do you mean if I run only "mongo" in the shell? or like a node.js module?


> For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoose-orm/5pyH6NW3Zyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongoose-orm+unsubscribe@googlegroups.com.

Richard Bateman

unread,
Feb 15, 2017, 11:07:23 AM2/15/17
to mongoo...@googlegroups.com
I mean like in a shell, yes. When dealing with a connection issue the
first thing to isolate is always whether it's node-specific or if your
server can't be reached, so you always try connecting with another
client to verify. If you can't connect with the "mongo" client/binary
then your node.js clienti won't connect either.

Richard

On Wed, Feb 15, 2017 at 12:52 AM, Fabrice Mpenge
>> > email to mongoose-orm...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> Documentation - http://mongoosejs.com/
>> Plugins - http://plugins.mongoosejs.com/
>> Bug Reports - http://github.com/learnboost/mongoose
>> Production Examples - http://mongoosejs.tumblr.com/
>> StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
>> Google Groups -
>> https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
>> Twitter - https://twitter.com/mongoosejs
>> IRC - #mongoosejs
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Mongoose Node.JS ODM" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/mongoose-orm/5pyH6NW3Zyw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> mongoose-orm...@googlegroups.com.
> You received this message because you are subscribed to the Google Groups
> "Mongoose Node.JS ODM" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongoose-orm...@googlegroups.com.

Fabrice Mpenge

unread,
Feb 15, 2017, 9:19:19 PM2/15/17
to mongoo...@googlegroups.com
Things pass very well with the shell. I also you Robomongo to visualize data from ma mongoDB, the connexion is fine


>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> Documentation - http://mongoosejs.com/
>> Plugins - http://plugins.mongoosejs.com/
>> Bug Reports - http://github.com/learnboost/mongoose
>> Production Examples - http://mongoosejs.tumblr.com/
>> StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
>> Google Groups -
>> https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
>> Twitter - https://twitter.com/mongoosejs
>> IRC - #mongoosejs
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Mongoose Node.JS ODM" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/mongoose-orm/5pyH6NW3Zyw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Documentation - http://mongoosejs.com/
> Plugins - http://plugins.mongoosejs.com/
> Bug Reports - http://github.com/learnboost/mongoose
> Production Examples - http://mongoosejs.tumblr.com/
> StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
> Google Groups -
> https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
> Twitter - https://twitter.com/mongoosejs
> IRC - #mongoosejs
> ---
> You received this message because you are subscribed to the Google Groups
> "Mongoose Node.JS ODM" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> For more options, visit https://groups.google.com/d/optout.

--
Documentation - http://mongoosejs.com/
Plugins - http://plugins.mongoosejs.com/
Bug Reports - http://github.com/learnboost/mongoose
Production Examples - http://mongoosejs.tumblr.com/
StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
Google Groups - https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
Twitter - https://twitter.com/mongoosejs
IRC - #mongoosejs
---
You received this message because you are subscribed to a topic in the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoose-orm/5pyH6NW3Zyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongoose-orm+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages