hack for "mongo db connection refused due to blocked port errno 10061" - mongodb

I m trying connect to my db in Mongolab:
>> mongo ds123456.mongolab.com
MongoDB shell version: 2.6.1
connecting to: ds123456.mongolab.com/test
2014-12-16T14:13:41.738+0100 warning: Failed to connect to 54.74.247.101:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2014-12-16T14:13:41.741+0100 Error: couldn't connect to server ds123456.mongolab.com:27017 (54.74.247.101), connection attempt failed at src/mongo/shell/mongo.js:148
exception: connect failed
I assume this question answers the first problem of access being blocked on this port.
The obvious solution is to contact the network admin. But I wonder if there is an alternative?
Thanks in advance.

Related

Error :couldn't connect to server 127.0.0.1:27017, connection attempt failed: NetworkTimeout Error connecting caused by Socket operation timed out

MongoDB shell version v4.4.6
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: NetworkTimeout: Error connecting to 127.0.0.1:27017 :: caused by :: Socket operation timed out :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
Everytime when I run mongo command , it says error connecting to 127.0.0.1:27017 caused by socket opeartion timed out.
Tried following many instructions given by peers , but it didn't work.
Hope I get rid of this by your instructions.
Thanks!
Reason: mongodb service is not running
Run mongodb service method:
Open the terminal and execute mongod -dbpath "D:\Program Files\MongoDB\data\db"
("D:\Program Files\MongoDB\data\db" is the directory you created to store data)
Open another terminal and execute mongo

Could not connect to mongodb. errno:111 Connection refused

I am using mongodb on ubuntu-16.04 but mongodb give server connection error:
MongoDB shell version: 3.2.9 connecting to: test
2016-09-23T12:01:10.258+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-09-23T12:01:10.286+0530 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
What can I do?
looks like your mongod process is not running on port 27017. Make sure your mongod process is running maybe verify with linux command.
If you start mongod process and even then it's failing to connect with mongo command, it means it's failing to intialize, check out designated mongo log file for the reason

MongoDB unable to run in Windows7

we have installed MongoDB 3.2.1. When i try to run it shows the following error.
C:\Program Files\MongoDB\Server\3.0\bin>mongo.exe
2016-01-13T12:48:14.974+0530 I CONTROL Hotfix KB2731284 or later update is installed, no need to zero-out data files
MongoDB shell version: 3.0.4
connecting to: test
2016-01-13T12:48:15.996+0530 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be
made because the target machine actively refused it.
2016-01-13T12:48:16.002+0530 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attemp
t failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Please any one help us to solve this issue.

Whats wrong with my Mongo query?

I've recently set a path in my vi .bash_profile to my mongo commands. I know this works because it was working yesterday.
However when I do it now I get this error:
AMAC02MX3APF8J3:~ james.flan$ mongo
MongoDB shell version: 3.0.3
connecting to: test
2015-05-19T11:34:58.708+0100 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
2015-05-19T11:34:58.710+0100 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Here is the content in my vi .bash_profile:
alias mongod="mongod --dbpath /Users/ryan.garrett/Documents/Software/MongoDB/data"
export PATH="/Users/ryan.garrett/Documents/Software/MongoDB/bin:$PATH"
Can someone please tell me how to connect to the server?
Check your /etc/hosts for localhost entry and also make sure that mongod is listening to all interfaces, you can check by netstat -an|grep mongo.

Remote MongoLab MongoDB login failed error

I am trying to connect to a mongoLab mongoDB using mongo shell. This is the error that I am getting:
C:\Program Files\MongoDB 2.6 Standard\bin>mongo ds053332.mongolab.com:53332/stormaxdb -u abhishek -p password
MongoDB shell version: 2.6.4
connecting to: ds053332.mongolab.com:53332/stormaxdb
2015-03-18T16:44:27.740+0530 Socket recv() errno:10053 An established connection was aborted by the software in your host machine. 54.224.106.116:53332
2015-03-18T16:44:27.742+0530 SocketException: remote: 54.224.106.116:53332error: 9001 socket exception [RECV_ERROR] server [54.224.106.116:53332]
2015-03-18T16:44:27.746+0530 DBClientCursor::init call() failed
2015-03-18T16:44:27.748+0530 Error: 10276 DBClientBase::findN: transport error: ds053332.mongolab.com:53390 ns: stormaxdb.$cmd query: { getnonce: 1 } at src/mongo/sh
ell/db.js:1210
exception: login failed
I searched a lot to fix this error but did not find a concrete solution. Can anybody guide how to solve it, and why is it coming?
I faced a similar issue. It appeared that my firewall was blocking connection to mongo server. Try unblocking mongo from the firewall settings and it should work.