@rmehta Having the same issue both when installed on ubuntu 16.04 and centos7 with frappe_docker as well as vanilla easy install on centos7. external_ip:8000 is not reachable.
In both of the above cases the host cannot connect to frappe/erpnext though the required ports are DNATed okay.
# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
PREROUTING_direct all -- 0.0.0.0/0 0.0.0.0/0
PREROUTING_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
OUTPUT_direct all -- 0.0.0.0/0 0.0.0.0/0
DOCKER all -- 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 0.0.0.0/0
MASQUERADE all -- 172.18.0.0/16 0.0.0.0/0
POSTROUTING_direct all -- 0.0.0.0/0 0.0.0.0/0
POSTROUTING_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
POSTROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
MASQUERADE tcp -- 172.17.0.2 172.17.0.2 tcp dpt:8080
MASQUERADE tcp -- 172.18.0.4 172.18.0.4 tcp dpt:3306
MASQUERADE tcp -- 172.18.0.6 172.18.0.6 tcp dpt:9000
MASQUERADE tcp -- 172.18.0.6 172.18.0.6 tcp dpt:8000
MASQUERADE tcp -- 172.18.0.6 172.18.0.6 tcp dpt:6787
MASQUERADE tcp -- 172.17.0.3 172.17.0.3 tcp dpt:22
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
RETURN all -- 0.0.0.0/0 0.0.0.0/0
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080 to:172.17.0.2:8080
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3307 to:172.18.0.4:3306
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9000 to:172.18.0.6:9000
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8000 to:172.18.0.6:8000
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:6787 to:172.18.0.6:6787
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2022 to:172.17.0.3:22
Chain OUTPUT_direct (1 references)
target prot opt source destination
Chain POSTROUTING_ZONES (1 references)
target prot opt source destination
POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
Chain POSTROUTING_ZONES_SOURCE (1 references)
target prot opt source destination
Chain POSTROUTING_direct (1 references)
target prot opt source destination
Chain POST_public (2 references)
target prot opt source destination
POST_public_log all -- 0.0.0.0/0 0.0.0.0/0
POST_public_deny all -- 0.0.0.0/0 0.0.0.0/0
POST_public_allow all -- 0.0.0.0/0 0.0.0.0/0
Chain POST_public_allow (1 references)
target prot opt source destination
Chain POST_public_deny (1 references)
target prot opt source destination
Chain POST_public_log (1 references)
target prot opt source destination
Chain PREROUTING_ZONES (1 references)
target prot opt source destination
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
Chain PREROUTING_ZONES_SOURCE (1 references)
target prot opt source destination
Chain PREROUTING_direct (1 references)
target prot opt source destination
Chain PRE_public (2 references)
target prot opt source destination
PRE_public_log all -- 0.0.0.0/0 0.0.0.0/0
PRE_public_deny all -- 0.0.0.0/0 0.0.0.0/0
PRE_public_allow all -- 0.0.0.0/0 0.0.0.0/0
Chain PRE_public_allow (1 references)
target prot opt source destination
Chain PRE_public_deny (1 references)
target prot opt source destination
Chain PRE_public_log (1 references)
target prot opt source destination
Containers connected to default docker0 bridge are reachable, but not the frappedocker_default brige (frappedocker_default network cannot be reached from outside · Issue #27 · frappe/frappe_docker · GitHub)
# brctl show
bridge name bridge id STP enabled interfaces
br-6e05216c4e39 8000.0242206fd64c no veth04de492
veth7d52632
veth94a19ba
vethe69056f
vetheb4465e
docker0 8000.0242f8ff1cc7 no veth531a3b4
veth73e5e4c
All necessary docker instances are running as it should:
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c74dfdfc6c0f jdeathe/centos-ssh:centos-7 "/usr/bin/supervisor…" 9 hours ago Up 6 hours (healthy) 0.0.0.0:2022->22/tcp centos-frappe
35beecebafd6 rancher/server:preview "/usr/bin/entry /usr…" 22 hours ago Up 10 hours 3306/tcp, 0.0.0.0:8080->8080/tcp naughty_visvesvaraya
ef89f33b1729 frappedocker_frappe "/bin/bash" 23 hours ago Up 10 hours 0.0.0.0:6787->6787/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp frappe
3474f6b5113e redis:alpine "docker-entrypoint.s…" 23 hours ago Up 10 hours 6379/tcp redis-socketio
cf7982c42492 mariadb "docker-entrypoint.s…" 23 hours ago Up 10 hours 0.0.0.0:3307->3306/tcp mariadb
317dfd665edb redis:alpine "docker-entrypoint.s…" 23 hours ago Up 10 hours 6379/tcp redis-queue
99646f3d70a0 redis:alpine "docker-entrypoint.s…" 23 hours ago Up 10 hours 6379/tcp redis-cache