当我从本地物理服务器访问端口时:
[root@iZuf63refzweg1d9dh94t7Z ~]# curl 172.19.150.82:9999
C0.com.xxl.rpc.remoting.net.params.XxlRpcResponse� requestIerrorMsgresult`N2jcom.xxl.rpc.util.XxlRpcException: xxl-rpc request data empty.
at com.xxl.rpc.remoting.net.impl.netty_http.server.NettyHttpServerHandler.process(NettyHttpServerHandler.java:78)
at com.xxl.rpc.remoting.net.impl.netty_http.server.NettyHttpServerHandler.access$000(NettyHttpServerHandler.java:27)
at com.xxl.rpc.remoting.net.impl.netty_http.server.NettyHttpServerHandler$1.run(NettyHttpServerHandler.java:51)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
它有效。当我从docker容器ping本地物理服务器时:
docker exec -it 4bf303105abb /bin/bash
ping 172.19.150.82
它可以工作。但是当我使用curl访问9999端口时:
root@4bf303105abb:/# curl 172.19.150.82:9999
curl: (7) Failed to connect to 172.19.150.82 port 9999: No route to host
如何解决问题?顺便说一下,我可以使用以下命令访问docker容器中的另一台物理机:
curl 172.19.104.230:9998
为什么会这样?