How to troubleshoot websocket connection error

Hi,

Im using C++ Windows SDK, however right after connection request i'm receiving this message from my LoadBalancing class implementation, in: LoadBalancingListener::debugReturn

ERROR websocketwindows.cpp         ExitGames::Photon::Internal::WebSocketConnect::connErr()   121 Connection error: 12029\n"

What does it mean and how to debug it more or resolve it?

Answers

  • Hi @mariuszvivid.


    That error code is coming from WinHTTP.

    As you can see at https://docs.microsoft.com/en-us/windows/win32/winhttp/error-messages error 12029 is really just a general "cannot connect" error.

    It means your client can't reach the server.

    The usual reason for this is that your firewall or router is blocking the connection attempt.

    Please make sure that you allow outgoing traffic on the ports that are listed on https://doc.photonengine.com/en-US/realtime/current/connection-and-authentication/tcp-and-udp-port-numbers

    You only need to allow traffic the ports for the Photon connection protocol that you actually use, either UDP, TCP, WS or WSS, with one exception: If you are using UDP and specify 'true' for the 'tryUseDatagramEncryption' connect option, then you also need to allow WSS traffic on port 19093 (only on that one single port) additionally to permitting UDP traffic.

    For UDP Photon uses ports 5056-5058, when 'useAlternativePorts' is false (the default), 27000-27002 otherwise.