jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.21k stars 727 forks source link

Host cannot telnet container after pipework command... #238

Closed ladenjet closed 4 years ago

ladenjet commented 4 years ago

natstat -tunlp result of container: tcp 0 0 192.168.1.10:8088 0.0.0.0: LISTEN 543/java
tcp 0 0 0.0.0.0:8989 0.0.0.0:
LISTEN 11089/java

where 192.168.1.10 is the address set by pipework command below: pipework br1 hadoop0 192.168.1.10/24

docker container port exposition is like below: [root@192-168-2-70 ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f940bc213258 a5e442e69031 "/usr/sbin/sshd -D" 2 days ago Up 2 days 0.0.0.0:8081->8081/tcp, 0.0.0.0:8088->8088/tcp, 0.0.0.0:8989->8989/tcp hadoop0

in the host with address 192.168.2.70: [root@192-168-2-70 ~]# telnet 192.168.2.70 8088 Trying 192.168.2.70... telnet: connect to address 192.168.2.70: Connection refused [root@192-168-2-70 ~]# telnet localhost 8088 Trying ::1... Connected to localhost. Escape character is '^]'. [root@192-168-2-70 ~]# telnet 192.168.2.70 8989 Trying 192.168.2.70... Connected to 192.168.2.70. Escape character is '^]'.

why port 8088 in the container cannot be accessed by host via telnet IP port .

jpetazzo commented 4 years ago

Hi,

I'm sorry, I'm not maintaining pipework anymore. I recommend to use host network mode instead, or network plugins.

Thanks!