[GH-ISSUE #1226] 节点连接bug #5098

Closed
opened 2026-03-01 15:39:17 +03:00 by kerem · 13 comments
Owner

Originally created by @z499738316 on GitHub (Jul 10, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1226

发现了一个bug,我的两个nginx ui是两个不同的环境,中间通过wireguard组网的,但是我用nginx1用wireguard的ip连接nginx2,会显示无法连接,但是用宿主机ping其实是可以的,并且也通过ningx1代理了nginx2上的服务,同理 nginx2用wireguard的ip连接nginx1也是一样的,两个环境会不断的创建tcp连接去发送请求,我也不知道创建了多少个,但是我看nginx ui显示的速率挺高的 800kb/s, 就几天时间跑了我将近4tb的流量
Image

Image
Originally created by @z499738316 on GitHub (Jul 10, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1226 发现了一个bug,我的两个nginx ui是两个不同的环境,中间通过wireguard组网的,但是我用nginx1用wireguard的ip连接nginx2,会显示无法连接,但是用宿主机ping其实是可以的,并且也通过ningx1代理了nginx2上的服务,同理 nginx2用wireguard的ip连接nginx1也是一样的,两个环境会不断的创建tcp连接去发送请求,我也不知道创建了多少个,但是我看nginx ui显示的速率挺高的 800kb/s, 就几天时间跑了我将近4tb的流量 <img width="2930" height="1140" alt="Image" src="https://github.com/user-attachments/assets/8e2bef7c-b5d4-4265-a9d9-83d21a76b2ae" /> <img width="2894" height="890" alt="Image" src="https://github.com/user-attachments/assets/65ae33aa-5c3e-433d-a75f-6f3c28e01eeb" />
kerem 2026-03-01 15:39:17 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@z499738316 commented on GitHub (Jul 10, 2025):

图中172.16.199.0/24这个网段是wireguard的虚拟网段,192.16.199.1是nginx2在wireguard的虚拟ip,在nginx1所属的服务器中 是可以直连的,如果条件允许 可以搞个todesk去还原一下

<!-- gh-comment-id:3057606110 --> @z499738316 commented on GitHub (Jul 10, 2025): 图中172.16.199.0/24这个网段是wireguard的虚拟网段,192.16.199.1是nginx2在wireguard的虚拟ip,在nginx1所属的服务器中 是可以直连的,如果条件允许 可以搞个todesk去还原一下
Author
Owner

@z499738316 commented on GitHub (Jul 10, 2025):

两个nginx互相把节点删除,重启nginx后恢复正常

<!-- gh-comment-id:3057610648 --> @z499738316 commented on GitHub (Jul 10, 2025): 两个nginx互相把节点删除,重启nginx后恢复正常
Author
Owner

@0xJacky commented on GitHub (Jul 10, 2025):

TCP 的话你可以用 tcpdump 抓一下报文看看

<!-- gh-comment-id:3057632778 --> @0xJacky commented on GitHub (Jul 10, 2025): TCP 的话你可以用 tcpdump 抓一下报文看看
Author
Owner

@z499738316 commented on GitHub (Jul 10, 2025):

Image
<!-- gh-comment-id:3057687499 --> @z499738316 commented on GitHub (Jul 10, 2025): <img width="2216" height="870" alt="Image" src="https://github.com/user-attachments/assets/a7aa5f8f-effb-4ebe-b3ec-fdfedfa1294d" />
Author
Owner

@z499738316 commented on GitHub (Jul 10, 2025):

Image
<!-- gh-comment-id:3057689798 --> @z499738316 commented on GitHub (Jul 10, 2025): <img width="1299" height="946" alt="Image" src="https://github.com/user-attachments/assets/81a73d24-0450-47b6-9f68-a44e13693a4a" />
Author
Owner

@z499738316 commented on GitHub (Jul 10, 2025):

好像没问题了 把回收站里的连接全部删除,重启nginx后 可以使用wireguard的虚拟ip进行连接了,我大概猜测一下,是不是程序不断的去连接节点,因为我没有重启之前节点是不可用的,所以大量的节点连接 就导致占用了带宽 刚好我两个nginx互相节点连接的所以上传和下载都占用了,所以服务的nginx跑了很多流量

<!-- gh-comment-id:3057750409 --> @z499738316 commented on GitHub (Jul 10, 2025): 好像没问题了 把回收站里的连接全部删除,重启nginx后 可以使用wireguard的虚拟ip进行连接了,我大概猜测一下,是不是程序不断的去连接节点,因为我没有重启之前节点是不可用的,所以大量的节点连接 就导致占用了带宽 刚好我两个nginx互相节点连接的所以上传和下载都占用了,所以服务的nginx跑了很多流量
Author
Owner

@z499738316 commented on GitHub (Jul 11, 2025):

不过这个tcp连接越来越多啊

Image
<!-- gh-comment-id:3060022890 --> @z499738316 commented on GitHub (Jul 11, 2025): 不过这个tcp连接越来越多啊 <img width="1040" height="4273" alt="Image" src="https://github.com/user-attachments/assets/3776ac15-16e6-44f9-b8d0-8bfb172d8461" />
Author
Owner

@0xJacky commented on GitHub (Jul 12, 2025):

你是在两个节点的都互相添加了对方为节点?

<!-- gh-comment-id:3064466169 --> @0xJacky commented on GitHub (Jul 12, 2025): 你是在两个节点的都互相添加了对方为节点?
Author
Owner

@0xJacky commented on GitHub (Jul 12, 2025):

麻烦提供一下两端 nginx-ui 的日志,journalctl -fu nginx-ui,在出现请求风暴时的日志信息。

<!-- gh-comment-id:3064478055 --> @0xJacky commented on GitHub (Jul 12, 2025): 麻烦提供一下两端 nginx-ui 的日志,`journalctl -fu nginx-ui`,在出现请求风暴时的日志信息。
Author
Owner

@z499738316 commented on GitHub (Jul 13, 2025):

你是在两个节点的都互相添加了对方为节点?

是的 都互相添加对方为节点

<!-- gh-comment-id:3066644640 --> @z499738316 commented on GitHub (Jul 13, 2025): > 你是在两个节点的都互相添加了对方为节点? 是的 都互相添加对方为节点
Author
Owner

@0xJacky commented on GitHub (Jul 13, 2025):

你是在两个节点的都互相添加了对方为节点?

是的 都互相添加对方为节点

如果只在一端添加呢? 本来设计就不是p2p是一主多从。

<!-- gh-comment-id:3066645856 --> @0xJacky commented on GitHub (Jul 13, 2025): > > 你是在两个节点的都互相添加了对方为节点? > > 是的 都互相添加对方为节点 如果只在一端添加呢? 本来设计就不是p2p是一主多从。
Author
Owner

@0xJacky commented on GitHub (Jul 15, 2025):

麻烦将两个节点都更新到最新的开发版本,看看问题是否得到解决?然后您可以将 RunMode 设置为 debug 并重启 nginx-ui,查看是否有异常日志出现。

<!-- gh-comment-id:3073295060 --> @0xJacky commented on GitHub (Jul 15, 2025): 麻烦将两个节点都更新到最新的开发版本,看看问题是否得到解决?然后您可以将 RunMode 设置为 debug 并重启 nginx-ui,查看是否有异常日志出现。
Author
Owner

@z499738316 commented on GitHub (Jul 17, 2025):

麻烦将两个节点都更新到最新的开发版本,看看问题是否得到解决?然后您可以将 RunMode 设置为 debug 并重启 nginx-ui,查看是否有异常日志出现。

现在还好,可能tcp虽然偏多了点,其他倒是正常了

<!-- gh-comment-id:3084015477 --> @z499738316 commented on GitHub (Jul 17, 2025): > 麻烦将两个节点都更新到最新的开发版本,看看问题是否得到解决?然后您可以将 RunMode 设置为 debug 并重启 nginx-ui,查看是否有异常日志出现。 现在还好,可能tcp虽然偏多了点,其他倒是正常了
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#5098
No description provided.