[
https://issues.apache.org/jira/browse/MESOS-9269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16629744#comment-16629744
]
z s commented on MESOS-9269:
----------------------------
I also see that if I change the command to ping the external internet, that
network request "hangs":
{code:java}
...
"cmd": "ping google.com",
...{code}
[~jieyu] here's the iptables nat
{code:java}
$ sudo iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 33 packets, 2732 bytes)
pkts bytes target prot opt in out source destination
72 4344 DOCKER all -- * * 0.0.0.0/0 0.0.0.0/0
ADDRTYPE match dst-type LOCAL
46 2784 MESOS-BRIDGE-PORT-MAPPER all -- * * 0.0.0.0/0
0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT 2 packets, 128 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 4 packets, 335 bytes)
pkts bytes target prot opt in out source destination
81 6005 DOCKER all -- * * 0.0.0.0/0 !127.0.0.0/8
ADDRTYPE match dst-type LOCAL
5 406 MESOS-BRIDGE-PORT-MAPPER all -- * * 0.0.0.0/0
!127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT 4 packets, 335 bytes)
pkts bytes target prot opt in out source destination
9 540 MASQUERADE all -- * !docker0 172.17.0.0/16
0.0.0.0/0
0 0 MASQUERADE tcp -- * * 172.17.0.2 172.17.0.2
tcp dpt:3888
0 0 MASQUERADE tcp -- * * 172.17.0.2 172.17.0.2
tcp dpt:2888
0 0 MASQUERADE tcp -- * * 172.17.0.2 172.17.0.2
tcp dpt:2181
0 0 MASQUERADE tcp -- * * 172.17.0.3 172.17.0.3
tcp dpt:8081
0 0 MASQUERADE tcp -- * * 172.17.0.3 172.17.0.3
tcp dpt:8080
0 0 CNI-82e39e8d2e77928aff7dd8f0 all -- * * 10.1.0.0/16
0.0.0.0/0 /* name: "mesos-bridge" id:
"48d3e3f9-9d37-4da7-9011-586138cd5e74" */
Chain CNI-82e39e8d2e77928aff7dd8f0 (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 10.1.0.0/16
/* name: "mesos-bridge" id: "48d3e3f9-9d37-4da7-9011-586138cd5e74" */
0 0 MASQUERADE all -- * * 0.0.0.0/0
!224.0.0.0/4 /* name: "mesos-bridge" id:
"48d3e3f9-9d37-4da7-9011-586138cd5e74" */
Chain DOCKER (2 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- docker0 * 0.0.0.0/0 0.0.0.0/0
15 900 DNAT tcp -- !docker0 * 0.0.0.0/0 0.0.0.0/0
tcp dpt:3888 to:172.17.0.2:3888
0 0 DNAT tcp -- !docker0 * 0.0.0.0/0 0.0.0.0/0
tcp dpt:2888 to:172.17.0.2:2888
11 660 DNAT tcp -- !docker0 * 0.0.0.0/0 0.0.0.0/0
tcp dpt:2181 to:172.17.0.2:2181
0 0 DNAT tcp -- !docker0 * 0.0.0.0/0 0.0.0.0/0
tcp dpt:8081 to:172.17.0.3:8081
0 0 DNAT tcp -- !docker0 * 0.0.0.0/0 0.0.0.0/0
tcp dpt:8080 to:172.17.0.3:8080
Chain MESOS-BRIDGE-PORT-MAPPER (2 references)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- !mesos-cni0 * 0.0.0.0/0
0.0.0.0/0 tcp dpt:22555 /* container_id:
48d3e3f9-9d37-4da7-9011-586138cd5e74 */ to:10.1.0.3:22555
{code}
> Mesos UCR with Docker only Works on Localhost
> ---------------------------------------------
>
> Key: MESOS-9269
> URL: https://issues.apache.org/jira/browse/MESOS-9269
> Project: Mesos
> Issue Type: Bug
> Components: agent, docker
> Affects Versions: 1.7.0
> Environment: Ubuntu 16.04
> Mesos 1.7.0
> Marathon 1.7.111
> Reporter: z s
> Priority: Major
>
> I'm having an issue setting up the `mesos-cni-port-mapper` to allow remote
> connectivity.
> When I `curl <host>:<port>` from the machine I get a response but from a
> remote machine the `curl` connection timesout. I'm not sure what's wrong with
> my route settings.
>
> */var/lib/mesos/cni/config/mesos-bridge.json*
>
> {code:java}
> {
> "name" : "mesos-bridge",
> "type" : "mesos-cni-port-mapper",
> "excludeDevices" : ["mesos-cni0"],
> "chain": "MESOS-BRIDGE-PORT-MAPPER",
> "delegate": {
> "type": "bridge",
> "bridge": "mesos-cni0",
> "isGateway": true,
> "ipMasq": true,
> "ipam": {
> "type": "host-local",
> "subnet": "10.1.0.0/16",
> "routes": [
> { "dst":
> "0.0.0.0/0" }
> ]
> }
> }
> }
> {code}
>
> {code:java}
> $ route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 0.0.0.0 172.27.1.1 0.0.0.0 UG 0 0 0 ens3
> 10.1.0.0 0.0.0.0 255.255.0.0 U 0 0 0 mesos-cni0
> 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
> 172.27.1.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
> {code}
> Any suggestions?
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)