且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

即使暴露了端口也无法访问。拒绝连接

更新时间:2023-12-01 20:27:46

通过 1 。服务器监听 127.0.0.1 是问题所在。一旦我们将侦听地址更改为 0.0.0.0 (在 netstat中显示为 ::: 下面的输出),我们能够连接到服务器:

Solved this issue thanks to 1. The server listening to 127.0.0.1 was the problem. Once we changed the listening address to 0.0.0.0 (shows as ::: in netstat output below), we are able to connect to the server:

root@e9766a94d102:/home# netstat -tuplen          
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 127.0.0.11:37641        0.0.0.0:*               LISTEN      0          12821468    -               
tcp6       0      0 :::7050                 :::*                    LISTEN      0          12821696    7/orderer       
udp        0      0 127.0.0.11:51855        0.0.0.0:*                           0          12821467    -       

不需要暴露发布标志。自我提醒:浪费了1.5天。

there is no need for either expose or publish flags. note to self: wasted 1.5 days on this.