[ 
https://issues.apache.org/jira/browse/MESOS-9269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16629578#comment-16629578
 ] 

z s commented on MESOS-9269:
----------------------------

[~jieyu] , here's a simple configuration. I also noticed that it only works if 
I specify the IP address of the host and not localhost. It sill only works when 
i curl from the local host. This seems to suggest an issue with my configured 
routes.
h3. Curl Command (from same host):

 
{code:java}
$ curl localhost:9873
curl: (7) Failed to connect to localhost port 9873: Connection refused
{code}
 

 
{code:java}
$ curl 172.27.1.35:9873
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Directory listing for /</title>
</head>
<body>
<h1>Directory listing for /</h1>
<hr>
<ul>
<li><a href="stderr">stderr</a></li>
<li><a href="stdout">stdout</a></li>
</ul>
<hr>
</body>
</html>
{code}
 
h3.  

Marathon Configuration:

 
{code:java}
{
 "id": "/my-app",
 "cmd": "python3 -m http.server $PORT0",
 "cpus": 1,
 "mem": 128,
 "disk": 0,
 "instances": 1,
 "acceptedResourceRoles": ["*"],
 "container": {
 "type": "MESOS",
 "docker": {
 "forcePullImage": false,
 "image": "python:alpine3.7",
 "parameters": [],
 "privileged": false
 },
 "volumes": [],
 "portMappings": [
 {
 "containerPort": 0,
 "hostPort": 0,
 "labels": {},
 "name": "http",
 "protocol": "tcp",
 "servicePort": 10001
 }
 ]
 },
 "networks": [
 {
 "mode": "container/bridge"
 }
 ],
 "portDefinitions": []
}{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)

Reply via email to