You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Marc Roos <M....@f1-outsourcing.eu> on 2019/07/31 21:19:22 UTC

How to get executor ports in container netns?

I have this environment variable 
MESOS_AGENT_ENDPOINT='192.168.10.114:5051' that gives me the 5051 port, 
how can I get the 192.168.10.114:37722 and 192.168.122.146:36313 so I 
can use them in iptables rules?

Eg. Are they available in variables, so I can parse them via the labels 
networks configuration?
"networks": [ 
    { "mode": "container", "name": "cni-apps","labels": {"EXECPORT1": 
"XXX"} }
  ],

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         
State       PID/Program name
tcp        0      0 0.0.0.0:36313           0.0.0.0:*               
LISTEN      3394535/mesos-execu
tcp        0      0 0.0.0.0:8899            0.0.0.0:*               
LISTEN      3394569/python
tcp        0      0 127.0.0.1:8899          127.0.0.1:49906         
TIME_WAIT   -
tcp        0      0 192.168.122.146:47874   192.168.10.114:5051     
ESTABLISHED 3394535/mesos-execu
tcp        0      0 192.168.122.146:36313   192.168.10.114:37722    
ESTABLISHED 3394535/mesos-execu