Can not connect mongodb droplet from another docker droplet?
Hi Guys, I have one question that i saw the error in my docker droplet(ip is 18.104.22.168) 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 [22.214.171.124: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 126.96.36.199 ) ufw config is:
To Action From -- ------ ---- 22 ALLOW Anywhere 80 ALLOW Anywhere 443 ALLOW Anywhere Anywhere ALLOW 188.8.131.52 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: 184.108.40.206
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×