NGO with Secure Websockets - Stale TLS Connectinos?

Hi I’ve noticed some peculiar behaviour with my remote Linux NGO game server instances (using secure websockets). I generally start up 3-4 game servers with NetworkManager.StartServer() so that clients have something they can quickly connect to. If these server instances have been running for an extended period (a couple hours or so) without any client connections, they seem to go “stale” and a connecting client will be disconnected immediately after connecting with the following TLS error on the server.

4TLS handshake failed at step 1. Closing connection.
\Failed to decrypt packet (error: 1048580). Likely internal TLS failure. Closing connection.

Does anyone know what might be the cause of this? The work around I have is to automatically restart inactive servers every 10min or so but I’d like to know more about what is causing the failure if anyone has experienced something similar?

Anything in the player.log indicating any kind of errors/exceptions?
You do have the OnTransportFailure callback implemented? IMO this is a must on a server.

I also wonder whether this could be caused by the OS networking rather than the server instance. Eg OS may decide to close an inactive port, something like that. Try with a minimal server build, empty project, just starting a server and logging any connections. If that happens there too you should report a bug.

Connectiños

Lovely typo. Emphasis mine. :slight_smile:

That’s an interesting failure case. I’ll admit leaving servers running for hours on end without having any client connect is not part of our standard test suite. So it’s very possible there’s something we’re not handling correctly here.

Could you share the Unity version you’re using, along with the versions for NGO and the Unity Transport package? I’ll file a bug on our end so that we can have a proper look into this.

Hi,

We’re using the following:

  • Unity 2022.3.45f1
  • Netcode for GameObjects 1.11.0
  • Unity Transport 2.4.0