henkelmax / simple-voice-chat

A working voice chat in Minecraft!
https://modrepo.de/minecraft/voicechat/wiki
422 stars 107 forks source link

UDP connections do not get released and overwhelms the proxy server #680

Closed edgeinfinity1 closed 3 months ago

edgeinfinity1 commented 3 months ago

Confirmation

Bug description

By forwarding port 24454 using OpenWRT and Socat, the udp connections are established seemingly forever. pic I have never met such problems on my proxy before, and its not likely to be caused by misconfiguration.

Minecraft version

1.20.4

Mod/Plugin version

latest

Mod/Plugin loader and version

Forge

Steps to reproduce

  1. Open the server with default configs
  2. forward port 24454 udp with Socat on an OpenWRT
  3. keep the server on for like 24 hours
  4. Anything relying on udp on the proxy server crashes, like nslookup.

Expected behavior

Any UDP connections should be released on newer ones created.

Log files

does not fit

Screenshots

No response

henkelmax commented 3 months ago

By forwarding port 24454 using OpenWRT and Socat, the udp connections are established seemingly forever.

First of all, UDP is connectionless, so theres no concept of actual connections. If nothing is sent in a specific timeframe, it automatically "closes". UDP does not have something to "close" a connection. You keep it alive by keep alive messages. If these aren't sent anymore it should be "closed" after a while.

This really hints at a misconfiguration on your end, but I can't really help you with that, as you didn't provide any information that would allow me to narrow down the issue. Make sure you don't have any keepalive option set. This would make the connection being infinitely open. The mod itself already sends keepalives.

You also didn't provide any information on your setup, so I can't really help you with that. You also didn't specify the mod version you are using latest could mean anything - Latest release version, latest alpha or beta version?? Latest version on CurseForge or Modrinth? The mod could have an update while this issue was opened...

henkelmax commented 3 months ago

Please feel free to reopen again if you have more information and an actual reason why this should be an issue with the mod.

edgeinfinity1 commented 3 months ago

3.18: after I switched the domain record to A only (while AAAA was enabled before), the problem disappeared somehow. it seems to be a problem related to IPV6 and this mod specifically, because I never had such problem with any other UDP usages. for those if you faced same problem as me ,the workaround is to disable IPV6 connection one way or another. I still suggest this is likely to be a problem with how the mod was programmed, but I cannot prove.

henkelmax commented 3 months ago

3.18:

What's that?

after I switched the domain record to A only (while AAAA was enabled before), the problem disappeared somehow. it seems to be a problem related to IPV6 and this mod specifically, because I never had such problem with any other UDP usages. for those if you faced same problem as me ,the workaround is to disable IPV6 connection one way or another. I still suggest this is likely to be a problem with how the mod was programmed, but I cannot prove.

That's a configuration issue on your end then.