Skip to content

Incompatibility with Simple Voice Chat: Assigned service port can collide with another services wrapper port. #1863

@Packsolite

Description

@Packsolite

Stacktrace

No cloudnet stacktrace available, issue is with port bindings.

Process using UDP port 44971:
COMMAND     PID      USER  FD   TYPE    DEVICE SIZE/OFF NODE NAME
java    1670346 minecraft 443u  IPv6 317519511      0t0  UDP *:44971

This is a spigot server that bound to udp port 44971 even though it's connection port is 40001. In the logs, i can confirm that SVC bound to UDP 40001 and there is no other plugin installed that could bind to that UDP port.
This suggests that it must be the cloudnet wrapper inside the spigot JVM that bound to 44971.
A few days later, cloudneet started another unrelated spigot service with the connection port 44971. This normally works fine, because minecraft binds only to TCP.
But in this case, SVC tries to bind to the same port as minecraft does but using UDP, which fails because that port is already used by the other service.

20:37:19] [VoiceChatServerThread/ERROR]: [voicechat] Voice chat server error
java.net.BindException: Address already in use

Actions to reproduce

Install SimpleVoiceChat on your network by installing it on your bungeecord instance in proxy mode and on each sub server.
Configure it to use the servers port but udp (port=-1) on the paper servers.
Everything works well, but after a while, when multiple servers were started and stopped, a port collision can randomly happen.

We found this only in production, but once it happens once it's quite common.
We suggest that the cloudnet wrapper binds to a port that is different from the services connection port but still inside the port range for service connections. We specifically had the two ports 44971 and 44972 collide the most.

CloudNet version

3.4.5-RELEASE-0f8f0d7

Other

No response

Issue uniqueness

  • Yes, this issue is unique. There are no similar issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    s: needs triageIssue waiting for triaget: bugSomething isn't working as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions