Tableau and Mongodb: WARNING: Access control is not enabled for mongosqld - mongodb

Hi guys I'm trying to conect mongodb to tableau but I'm getting some errors and idk why. This is what a get:
C:\Program Files\MongoDB\Connector for BI\2.9\bin>mongosqld --schema schema.drdl --mongo-uri localhost
2019-01-03T11:01:39.503-0500 I CONTROL [initandlisten] mongosqld starting: version=v2.9.0 pid=14140 host=DESKTOP-BIP3KIF
2019-01-03T11:01:39.663-0500 I CONTROL [initandlisten] git version: d8cbef70c1e612d299f120dd997b3872ab32a679
2019-01-03T11:01:39.663-0500 I CONTROL [initandlisten] OpenSSL version OpenSSL 1.0.2n-fips 7 Dec 2017 (built with OpenSSL 1.0.2o 27 Mar 2018)
2019-01-03T11:01:39.663-0500 I CONTROL [initandlisten] options: {schema: {path: "schema.drdl"}, mongodb: {net: {uri: "localhost"}}}
2019-01-03T11:01:39.663-0500 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for mongosqld.
2019-01-03T11:01:39.663-0500 I CONTROL [initandlisten]
listen tcp 127.0.0.1:3307: bind: Intento de acceso a un socket no permitido por sus permisos de acceso.
It says that I do not have the privileges to do this, but I'm running my cmd as admin, any ideas to solve this?
Here is my guide https://docs.mongodb.com/bi-connector/v2.0/installation/
and I'm stuck in the 5 step
Edit, It seems that the connection is established but I cant see the collections or the documents

The process mongosqld you are trying to start tries to use TCP port 3307. This port should be usable by anyone, unless it is already used by a different program.
You can type in an cmd.exe shell with admin permissions the command
netstat -b -p tcp
It lists all used ports and the processes which use them. Search for port 3307 and check which process blocks it.

I know this is a late answer but try starting with the option:
--noUnixSocket
Is it possible you have mysqld running on the box? I have seen errors like this when the socket is in use. If that doesn't work you may also try setting this option
--addr=127.0.0.1

Related

loading docker container from existing project, mongo will not connect to database Ubuntu 18.04

At first I had a problem where the mongod service stopped working altogether. Thereupon I completely uninstalled mongodb and reinstalled it and followed instructions per this thread: https://askubuntu.com/questions/921753/failed-to-start-mongod-service-unit-mongod-service-not-found
This caused the mongod service to finally start.
In order for it to work, I also had to follow instructions from this thread:
mongo - couldn't connect to server 127.0.0.1:27017
So far this configuration has worked only 1 time and that was after I followed the instructions to remove the .lock file in the mongod directory and then repair mongod.
I also tried to remove the sock file like stated here: MongoDB Failing to Start - ***aborting after fassert() failure
Full project reset
Then I tried just disconnecting the project entirely; close nodemon for backend, exit ng serve on frontend, stop and remove mongo docker container... And tried again. Here is my step-by-step process after everything should have been fixed:
Restart mongod service
sudo service mongod restart
Restart frontend (executed from frontend directory)
ng serve frontend
Restart backend (executed from backend directory)
npx nodemon backend
Restart mongo container (executed from deploy directory, mongo is the docker container name, I'm building it from existing provided deploy script)
sudo docker-compose up -d mongo
sudo docker ps -a # check container was created and is running
Debugging information:
sudo service mongod status
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset:
Active: active (running) since Thu 2020-01-09 11:21:43 CET; 3min 40s ago
Docs: https://docs.mongodb.org/manual
Main PID: 17242 (mongod)
CGroup: /system.slice/mongod.service
└─17242 /usr/bin/mongod --config /etc/mongod.conf
janv. 09 11:21:43 junior-LIFEBOOK-E752 systemd[1]: Started MongoDB Database Server
sudo mongod2020-01-09T11:25:45.983+0100 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] MongoDB starting : pid=17727 port=27017 dbpath=/data/db 64-bit host=junior-LIFEBOOK-E752
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] db version v4.2.2
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] git version: a0bbbff6ada159e19298d37946ac8dc4b497eadf
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1d 10 Sep 2019
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] allocator: tcmalloc
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] modules: none
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] build environment:
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] distmod: ubuntu1804
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] distarch: x86_64
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] target_arch: x86_64
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] options: {}
2020-01-09T11:25:45.987+0100 E STORAGE [initandlisten] Failed to set up listener: SocketException: Address already in use
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] now exiting
2020-01-09T11:25:45.987+0100 I CONTROL [initandlisten] shutting down with code:48
sudo mongo
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("8e813fc2-049c-440d-83ce-0b1d8516c4d0") }
MongoDB server version: 4.2.2
Server has startup warnings:
2020-01-09T11:21:43.352+0100 I STORAGE [initandlisten]
2020-01-09T11:21:43.352+0100 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2020-01-09T11:21:43.352+0100 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2020-01-09T11:21:44.848+0100 I CONTROL [initandlisten]
2020-01-09T11:21:44.848+0100 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-01-09T11:21:44.848+0100 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2020-01-09T11:21:44.848+0100 I CONTROL [initandlisten]
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
So something weird is happening here, it doesn't find the database from the project and I have no clue why. As far as I can see, it creates a new database including my system details.
How can I fix this please and connect to the project database? I can't move further until I do.
it's been resolved. First I found out I didn't need to have the mongod service running locally because mongo was already included in the docker container. But actually this wasn't a database issue at all. There were a few things going wrong like there was a proxy but the command had been changed to execute the connection, endpoints were on localhost but weren't supposed to be, and the content I was expecting to see had been hidden by a careless push from another developer. Fun times! But we can move on now. Thanks to the people who tried to help!

Unable to connect local mongod server from EC2, whereas able to connect from vice versa

Unable to connect my local MongoDB server from AWS EC2 instance, whereas I am able to connect vice versa.
From EC2 to Local Mongod server:
root#ip-172-31-31-13:~# mongo -u krishna -p Kmk123## 192.168.0.104/admin
MongoDB shell version v4.0.12
connecting to: mongodb://192.168.0.104:27017/admin?gssapiServiceName=mongodb
2019-08-26T16:48:14.271+0000 E QUERY [js] Error: couldn't connect to server 192.168.0.104:27017, connection attempt failed: SocketException: Error connecting to 192.168.0.104:27017 :: caused by :: Connection timed out :
connect#src/mongo/shell/mongo.js:344:17
#(connect):2:6
exception: connect failed
root#ip-172-31-31-13:~#
From Local to AWS EC2 :
[root#krishna ~]# mongo -u root -p root123 ec2-18-206-199-178.compute-1.amazonaws.com/admin
MongoDB shell version v4.0.12
connecting to: mongodb://ec2-18-206-199-178.compute-1.amazonaws.com:27017/admin?gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("a6b35f6a-3e71-4ada-b10a-c0783743837b") }
MongoDB server version: 4.0.12
Server has startup warnings:
2019-08-26T16:36:21.897+0000 I STORAGE [initandlisten]
2019-08-26T16:36:21.897+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2019-08-26T16:36:21.897+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2019-08-26T16:36:22.912+0000 I CONTROL [initandlisten]
2019-08-26T16:36:22.912+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten]
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten]
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten]
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2019-08-26T16:36:22.913+0000 I CONTROL [initandlisten]
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
>
>
I have edited SG of EC2 instace as below:
SSH TCP 22 0.0.0.0/0 Custom TCP Rule TCP 27017 0.0.0.0/0 Custom TCP
Rule TCP 27017::/0
You need to update mongod.conf file to allow your mongodb accessed from remote. It works for me when I do all the things mentioned in following page.
Ref: https://ianlondon.github.io/blog/mongodb-auth/

Problems starting MongoDB on Windows

I did the mongodb installation, but when I try to start in windows 10 console, the log shows me the following:
C:\WINDOWS\system32>"C:\Program
Files\MongoDB\Server\3.6\bin\mongod.exe" 2017-12-13T11:09:06.089-0700
I CONTROL [initandlisten] MongoDB starting : pid=11240 port=27017
dbpath=C:\data\db\ 64-bit host=DESKTOP-5GUM84N
2017-12-13T11:09:06.089-0700 I CONTROL [initandlisten] targetMinOS:
Windows 7/Windows Server 2008 R2 2017-12-13T11:09:06.090-0700 I
CONTROL [initandlisten] db version v3.6.0
2017-12-13T11:09:06.091-0700 I CONTROL [initandlisten] git version:
a57d8e71e6998a2d0afde7edc11bd23e5661c915 2017-12-13T11:09:06.092-0700
I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22
Sep 2016 2017-12-13T11:09:06.092-0700 I CONTROL [initandlisten]
allocator: tcmalloc 2017-12-13T11:09:06.092-0700 I CONTROL
[initandlisten] modules: none 2017-12-13T11:09:06.093-0700 I CONTROL
[initandlisten] build environment: 2017-12-13T11:09:06.093-0700 I
CONTROL [initandlisten] distmod: 2008plus-ssl
2017-12-13T11:09:06.094-0700 I CONTROL [initandlisten] distarch:
x86_64 2017-12-13T11:09:06.095-0700 I CONTROL [initandlisten]
target_arch: x86_64 2017-12-13T11:09:06.095-0700 I CONTROL
[initandlisten] options: {} 2017-12-13T11:09:06.100-0700 I -
[initandlisten] Detected data files in C:\data\db\ created by the
'wiredTiger' storage engine, so setting the active storage engine to
'wiredTiger'. 2017-12-13T11:09:06.101-0700 I STORAGE [initandlisten]
wiredtiger_open config:
create,cache_size=3534M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2017-12-13T11:09:06.574-0700 I STORAGE [initandlisten] WiredTiger
message [1513188546:574263][11240:140724166549840], txn-recover: Main
recovery loop: starting at 10/4608 2017-12-13T11:09:06.787-0700 I
STORAGE [initandlisten] WiredTiger message
[1513188546:786400][11240:140724166549840], txn-recover: Recovering
log 10 through 11 2017-12-13T11:09:07.034-0700 I STORAGE
[initandlisten] WiredTiger message
[1513188547:34042][11240:140724166549840], txn-recover: Recovering log
11 through 11 2017-12-13T11:09:07.732-0700 I CONTROL [initandlisten]
2017-12-13T11:09:07.732-0700 I CONTROL [initandlisten] ** WARNING:
Access control is not enabled for the database.
2017-12-13T11:09:07.733-0700 I CONTROL [initandlisten] **
Read and write access to data and configuration is unrestricted.
2017-12-13T11:09:07.735-0700 I CONTROL [initandlisten]
2017-12-13T11:09:07.735-0700 I CONTROL [initandlisten] ** WARNING:
This server is bound to localhost. 2017-12-13T11:09:07.736-0700 I
CONTROL [initandlisten] ** Remote systems will be unable to
connect to this server. 2017-12-13T11:09:07.736-0700 I CONTROL
[initandlisten] ** Start the server with --bind_ip
to specify which IP 2017-12-13T11:09:07.737-0700 I CONTROL
[initandlisten] ** addresses it should serve responses from,
or with --bind_ip_all to 2017-12-13T11:09:07.737-0700 I CONTROL
[initandlisten] ** bind to all interfaces. If this behavior
is desired, start the 2017-12-13T11:09:07.738-0700 I CONTROL
[initandlisten] ** server with --bind_ip 127.0.0.1 to disable
this warning. 2017-12-13T11:09:07.738-0700 I CONTROL [initandlisten]
2017-12-13T11:09:07.739-0700 I CONTROL [initandlisten]
2017-12-13T11:09:07.739-0700 I CONTROL [initandlisten] ** WARNING:
The file system cache of this machine is configured to be greater than
40% of the total memory. This can lead to increased memory pressure
and poor performance. 2017-12-13T11:09:07.740-0700 I CONTROL
[initandlisten] See
http://dochub.mongodb.org/core/wt-windows-system-file-cache
2017-12-13T11:09:07.740-0700 I CONTROL [initandlisten]
2017-12-13T15:09:08.161-0300 W FTDC [initandlisten] Failed to
initialize Performance Counters for FTDC: WindowsPdhError:
PdhExpandCounterPathW failed with 'The specified object is not
found on the computer.' for counter '\Memory\Available Bytes'
2017-12-13T15:09:08.161-0300 I FTDC [initandlisten] Initializing
full-time diagnostic data capture with directory
'C:/data/db/diagnostic.data' 2017-12-13T15:09:08.165-0300 I NETWORK
[initandlisten] waiting for connections on port 27017
I followed all the intructions in https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#run-mongodb-community-edition
but i can't start mongodb. anyone knows how to fix this launch error ?
I hope your help guys :c
Regards!
Your mongod actually started successfully initially in the beginning. The log output:
NETWORK [initandlisten] waiting for connections on port 27017
indicates that the mongod is online and waiting for connections on the specified port. You could have at that point opened a mongo shell on the same machine to connect to the mongod.
However, I understand that the warnings as displayed could indicate that there was an issue in operation. We've updated our documentation to address this:
You can find the documentation in question here:
Run MongoDB Community on Windows
It looks like other users have helped you with getting a good working configuration file, but I'd like to pick apart the original output to clarify any confusion encountered there.
Lets start by breaking up your original mongod process output:
CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2017-12-13T11:09:07.733-0700
This is a warning that indicates you did not start the mongod process using authentication or authorization. Since it seems like you are using the default settings for 3.6, this is an expected informational warning. Please read through the MongoDB documentation on authentication when you get a chance and plan for implementing simple authentication, especially if the mongod will be exposed to the public internet at any point in time.
The next warning is:
CONTROL [initandlisten] ** WARNING: This server is bound to localhost. 2017-12-13T11:09:07.736-0700
By default in MongoDB 3.6, the mongod binds to the localhost address. In short, the mongod only listens for connections on the local machine. This gives you time to configure authentication before you open up your MongoDB deployment to your private network or the public internet.
As noted by other users, you can resolve this by setting the net.bindIp in your configuration file:
net:
bindIp: 127.0.0.1
When you are ready to open the mongod to non-localhost connections, just append an IP address associated to a network adapter on the host machine. For example, if the host machine has a network adapter 192.168.1.15, you can add that to bindIp. This tells the mongod to listen for incoming connections on both addresses.
net:
bindIp: "127.0.0.1,192.168.1.15"
As far as the FTDC warning, the \Memory\Available Bytes counter is related to Windows Performance Management - you can read more about that here. You may need to configure some Windows components to enable that counter. Its also possible that the counter is only available (or accessible) in the Server architectures of Windows.
The warning is informational and should not impact normal operations, unless you are heavily reliant on FTDC data for your work.
You can find more information on log messages in MongoDB in our Log Message documentation.
i believe this message is from mongod(mongodb server).
and now you have to run mongo.exe inside "bin"folder to connect to the server(with mongod on, don't close the window) in order to start mongodb.
make sure you created a mongod.cfg inside C:\Program Files\MongoDB\Server\3.6\mongod.cfg
which is from step 3 Create a configuration file.
open that file and type those things below to mongod.cfg
systemLog:
destination: file
path: c:\data\log\mongod.cfg
storage:
dbPath: c:\data\db
if there's still error try to copy and past these code inside mongod.cfg:
systemLog:
destination: file
path: c:\data\log\mongod.cfg
logAppend: true
storage:
journal:
enabled: true
processManagement:
fork: true
net:
bindIp: 127.0.0.1
port: 27017
setParameter:
enableLocalhostAuthBypass: false
Put the following in your mongod.cfg
net:
port: 27017
bindIp: "127.0.0.1"
Then the MONGO command can connect to the local instance.

MongoDB suddenly missing / data not found

Our MongoDB database in Digital Ocean suddenly went missing. When I run mongod, it says:
MongoDB starting : pid=27161 port=27017 dbpath=/data/db 64-bit host=unifyhub-db
2017-01-07T17:36:06.617+0800 I CONTROL [initandlisten] db version v3.0.11
2017-01-07T17:36:06.617+0800 I CONTROL [initandlisten] git version: 48f8b49dc30cc2485c6c1f3db31b723258fcbf39
2017-01-07T17:36:06.617+0800 I CONTROL [initandlisten] build info: Linux ip-10-65-215-98 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2017-01-07T17:36:06.617+0800 I CONTROL [initandlisten] allocator: tcmalloc
2017-01-07T17:36:06.617+0800 I CONTROL [initandlisten] options: {}
2017-01-07T17:36:06.676+0800 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017
2017-01-07T17:36:06.677+0800 E NETWORK [initandlisten] addr already in use
2017-01-07T17:36:06.677+0800 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2017-01-07T17:36:06.677+0800 I CONTROL [initandlisten] dbexit: rc: 100
Do you have any idea what happen here? We actually didn't do anything, we just found out that the whole application was not working because the database can't be found.
I think you were hijacked!
according to http://thehackernews.com/2017/01/secure-mongodb-database.html and http://securityaffairs.co/wordpress/55018/cyber-crime/mongodb-hacked.html there is a hacker targeting the opened MongoDB databases, and asks for ransom to return your data back.
I faced the exact same problem as yours. I thought it is something related to digital-ocean but after reading those posts, I checked my server and it is confirmed that it was hijacked.
I opened a mongo shell
mongo;
listed the databases
show dbs;
found a database called READ1 I checked it and found a collection with only one record, a message from the hijacker
use READ1;
show collections; // found a collection called info
db.info.find()
found this document:
{ "_id" : ObjectId("5877674456ae6684507ac017"), "mail" :
"ha******#si*****.org", "text" : "SEND 0.1 BTC TO THIS ADDRESS *****
AND CONTACT THIS EMAIL WITH IP OF YOUR SERVER TO RECOVER YOUR DATABASE
!" }
unfortunately, I didn't check the server since a while and I only keep the last five backups, so I lost my data. But luckily we are still in development mode and we don't have sensitive data.
anyway, I found my Mongodb version (2.4.10 Tokumx distribution) allows remote access by default. I tried the following from my local machine and it is surprisingly connected!!
mongo server-ip:27017/database-name
Finally, I made the following steps to disable the remote access
ps aux | grep mongo //found path of the configuration file (/etc/tokumx.conf)
then as described here, I used vim to append the line bind_ip = 127.0.0.1 to the configuration files
then restarted my tokumx service (mongodb in your case)
sudo service tokumx restart
Now remote access is disabled.
Make sure your config file is loaded by explicitly calling it when running mongod:
mongod --config /etc/mongod.conf
And in your /etc/mongod.conf file make sure you have
bindIp: 127.0.0.1
Now after restarting with this config file, like Ahmed ElBayaa says (I could not comment because of low reputation), try from a remote machine to connect using:
mongo server-ip:27017/
If all is configured correctly this connection should be refused!

Unable to connect to mongodb in docker container

Getting connection refused when trying to connect to MongoDb in Docker container.
Here's the output of docker ps:
docker ps CONTAINER ID IMAGE COMMAND
CREATED STATUS PORTS
NAMES 21063296d7d8 mongo "/entrypoint.sh mongo"
44 minutes ago Up 29 minutes 0.0.0.0:57017->27017/tcp
mongodb-dev
Here's the snippet of docker logs mongodb-dev:
2015-11-28T05:36:36.363+0000 I CONTROL [initandlisten] db version
v3.0.7 2015-11-28T05:36:36.363+0000 I CONTROL [initandlisten] git
version: 6ce7cbe8c6b899552dadd907604559806aa2e9bd
2015-11-28T05:36:36.363+0000 I CONTROL [initandlisten] build info:
Linux ip-10-183-78-195 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
BOOST_LIB_VERSION=1_49 2015-11-28T05:36:36.363+0000 I CONTROL
[initandlisten] allocator: tcmalloc 2015-11-28T05:36:36.363+0000 I
CONTROL [initandlisten] options: {} 2015-11-28T05:36:36.365+0000 I
NETWORK [initandlisten] waiting for connections on port 27017
Here's the error when connecting to MongoDB in docker using port 57017
mongo localhost:57017
MongoDB shell version: 3.0.7 connecting to: localhost:57017/test
2015-11-27T22:09:22.733-0800 W NETWORK Failed to connect to
127.0.0.1:57017, reason: errno:61 Connection refused 2015-11-27T22:09:22.734-0800 E QUERY Error: couldn't connect to
server localhost:57017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181 exception: connect failed
Please let me know what I'm missing here. Thank you for your help!
It depends if you are using docker directly on a Linux host or on a Mac.
In the latter case, you would need to make sure you have port forwarded 57017 in your VirtualBox connection settings, as I mention in "How to connect mysql workbench to running mysql inside docker?"
VBoxManage controlvm "boot2docker-vm" --natpf1 "tcp-port57017 ,tcp,,57017,,57017"
VBoxManage controlvm "boot2docker-vm" --natpf1 "udp-port57017 ,udp,,57017,,57017"