Node.js在ubuntu上没有收到请求

时间:2017-11-15 22:53:27

标签: node.js ubuntu server netstat

当我将服务器的IP地址和端口放在浏览器上时,没有响应,也没有到达服务器。以下是服务器的一些统计信息;我在端口5403上运行服务器

sudo ufw status verbose

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22                         ALLOW IN    Anywhere
80                         ALLOW IN    Anywhere
443                        ALLOW IN    Anywhere
5403                       ALLOW IN    Anywhere
22 (v6)                    ALLOW IN    Anywhere (v6)
80 (v6)                    ALLOW IN    Anywhere (v6)
443 (v6)                   ALLOW IN    Anywhere (v6)
5403 (v6)                  ALLOW IN    Anywhere (v6)

另一个命令

netstat -an | grep "LISTEN "

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:25324           0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 :::5403                 :::*                    LISTEN

1 个答案:

答案 0 :(得分:0)

You only listen to ipv6, this often pose a problem. Try to disable IPv6 and run on IPv4 address in stead.