From f50ceb54a979e6287405226ac899996c60299240 Mon Sep 17 00:00:00 2001 From: Yuliya Palamarchuk Date: Thu, 21 Nov 2019 23:29:15 +0300 Subject: [PATCH] Fixed not being able to connect to mongo From version 3.6+ mongodb by default binds only to localhost (127.0.0.1) IP. That can be checked with "netstat -tulpn | grep LISTEN" command in container. It will return "127.0.0.1:27017 | 0.0.0.0:* | LISTEN | 15/mongod" for mongod. That causes inability to connect to running mongo from host machine. Proposed change allows mongo to bind to container network interface, thus allowing connections from host machine. --- pkg/scripts/all-in-one.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scripts/all-in-one.bash b/pkg/scripts/all-in-one.bash index dbcbdf1a..bccfaf52 100755 --- a/pkg/scripts/all-in-one.bash +++ b/pkg/scripts/all-in-one.bash @@ -10,7 +10,7 @@ # BigchainDB configuration bigchaindb-monit-config -nohup mongod > "$HOME/.bigchaindb-monit/logs/mongodb_log_$(date +%Y%m%d_%H%M%S)" 2>&1 & +nohup mongod --bind_ip_all > "$HOME/.bigchaindb-monit/logs/mongodb_log_$(date +%Y%m%d_%H%M%S)" 2>&1 & # Tendermint configuration tendermint init