Report this

What is the reason for this report?

Can not connect mongodb droplet from another docker droplet?

Posted on May 19, 2017

Hi Guys, I have one question that i saw the error in my docker droplet(ip is 104.131.114.98) like, any thing else to make it work? Thank you:

/opt/reaction/dist/bundle/programs/server/node_modules/fibers/future.js:313
						throw(ex);
						^
**MongoError: failed to connect to server [104.236.41.77:27017] on first connect**
    at Object.Future.wait (/opt/reaction/dist/bundle/programs/server/node_modules/fibers/future.js:449:15)
    at new MongoConnection (packages/mongo/mongo_driver.js:211:27)

Can not figure why this happens. my mongodb droplet (ip is 104.236.41.77 ) ufw config is:

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
Anywhere                   ALLOW       104.131.114.98
27017                      ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)
27017 (v6)                 ALLOW       Anywhere (v6)

my mongodb configure is:

# Where and how to store data.
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 104.236.41.77

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.