MongoDB shell version v3.6.4 - mongodb

MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
2018-09-25T10:40:02.677+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017 after 5000ms milliseconds, giving up.
2018-09-25T10:40:02.677+0530 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:251:13
#(connect):1:6
exception: connect failed

Related

Mongo errno:111 Connection refused (ubuntu)?

my mongod service is unable to start i try all the solution available i tried following commands
sudo rm /var/lib/mongod/mongod.lock
sudo service mongod start
sudo service mongod restart
but still get the following error :-
MongoDB shell version: 3.2.19
connecting to: test
2018-07-23T04:49:02.322+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: errno:111 Connection refused
2018-07-23T04:49:02.322+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:229:14
#(connect):1:6
exception: connect failed

Mongodb not connecting after insert with python

Im making a python API and making some inserts , suddenly i cant connect to mongo anymore
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
2018-07-19T07:16:16.067-0300 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-07-19T07:16:16.068-0300 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:251:13
#(connect):1:6
exception: connect failed
Any idea on what could be causing this? my ubuntu

mongodb exception connection failed

when I'm trying to open mongodb with command prompt I'm getting a error message like
D:\mongo-bd\bin>mongo.exe
MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
2018-04-27T18:50:28.340+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1
:27017 after 5000ms milliseconds, giving up.
2018-04-27T18:50:28.340+0530 E QUERY [thread1] Error: couldn't connect to ser
ver 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:251:13
#(connect):1:6
exception: connect failed
I have tried by running mongo --repair command but still I'm facing this problem.
1 First set up the data directory - google it
2 then run the
{installationDirectory}/MongoDB/Server/{serverVersion}/bin/mongod.exe
to start the service
3 Get into the shell
{installationDirectory}/MongoDB/Server/{serverVersion}/bin/mongo.exe

mongodb installation error connection failed on windows

I have tried all solutions mentioned in below 2 links
Mongodb: Failed to connect to 127.0.0.1:27017, reason: errno:10061
How to start mongo db on windows
But still getting below error
`C:\Program Files (x86)\MongoDB\Server\3.2\bin>mongo MongoDB shell
version: 3.2.18-15-g678cb63 connecting to: test
2018-01-26T16:39:23.926+0530 W NETWORK [thread1] Failed to connect to
127.0.0.1 :27017 after 5000ms milliseconds, giving up. 2018-01-26T16:39:23.927+0530 E QUERY [thread1] Error: couldn't
connect to ser ver 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:229:14 #(connect):1:6
exception: connect failed`
Open onemore terminal as admin and run mongod. After this you can start your app in main terminal.

Why is it giving me active:failed error while installation of mongodb on my ubuntu 16.04 LTS?

MongoDB shell version v3.4.1
connecting to: mongodb://127.0.0.1:27017
2017-12-06T12:16:58.540+0530 W NETWORK [main] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2017-12-06T12:16:58.540+0530 E QUERY [main] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:234:13
#(connect):1:6
exception: connect failed
You need to first start mongo server at port 27017.
You can do it by executing following command:
mongod --port 27017 --dbpath [database_path]