Jump to content

Failed to connect to server. The connection request has timed out.


Verci from 2017
 Share

Recommended Posts

Hello,

Can't join multiplayer games ("Failed to connect to server. The connection request has timed out") when playing via VPN
Hello everyone,
I'm playing 0 A.D. on Windows and I'm having trouble joining multiplayer rooms in the lobby. Just im able to join couple of the games, and most others are not able for me to join. Whenever I try to join, I get the following error:
"Failed to connect to server. The connection request has timed out."
Context & Setup:
  • Location & Connection: I have to use a personal VPS in Finland via AmneziaVPN because without a VPN my ISP blocks the XMPP lobby connection ("An I/O error occurred").
  • Lobby & STUN: With the VPN active, I can enter the lobby without issues, and mainlog.html shows that STUN detects my external VPN IP properly (StunClient: external IP address is <my_VPS_IP>:60345).
  • The Issue: When trying to connect to a room (e.g., NetClient: connecting to server at 103.151.118.2:20595), the log repeatedly outputs warntype:"server-timeout" until it disconnects, even though other players are already inside that room.
What I have already tried:
  1. Tested different VPN protocols on my VPS (AmneziaWG and OpenVPN over UDP).
  2. Lowered the VPN interface MTU from 1376 to 1280 and disabled obfuscation junk packets (Jc = 0).
  3. Allowed both pyrogenesis.exe and Pyrogenesis engine through Windows Defender Firewall for both Private and Public networks.
  4. Tried split tunneling (bypassing VPN for pyrogenesis.exe), which results in the lobby I/O error due to ISP restrictions.
 
Link to comment
Share on other sites

57 minutes ago, Verci from 2017 said:

my ISP blocks the XMPP lobby connection

Are you sure that's the case? That would be pretty odd for an ISP to do.

1 hour ago, Verci from 2017 said:

With the VPN active, I can enter the lobby without issues, and mainlog.html shows that STUN detects my external VPN IP properly

If both of that works, connecting to most games in the lobby should work as well.

1 hour ago, Verci from 2017 said:

Just im able to join couple of the games, and most others are not able for me to join.

That could very well be caused by the network setup of the players hosting these games.

1 hour ago, Verci from 2017 said:

When trying to connect to a room (e.g., NetClient: connecting to server at 103.151.118.2:20595), the log repeatedly outputs warntype:"server-timeout" until it disconnects

If STUN works for you, UDP connections in general work for you. If you can't connect to a hosted game (which uses UDP as well) this points to a network problem either caused by your setup or by the player hosting the games. In the vast majority of causes CGNAT is causing such issues.

Link to comment
Share on other sites

31 minutes ago, Dunedan said:

Are you sure that's the case? That would be pretty odd for an ISP to do.

If both of that works, connecting to most games in the lobby should work as well.

That could very well be caused by the network setup of the players hosting these games.

If STUN works for you, UDP connections in general work for you. If you can't connect to a hosted game (which uses UDP as well) this points to a network problem either caused by your setup or by the player hosting the games. In the vast majority of causes CGNAT is causing such issues.

Thanks for the reply! Yes, deep packet inspection (DPI) in my region drops the TLS/XMPP handshake to the lobby without a VPN, so playing via my Finnish VPS is the only way to reach the lobby.
Since STUN works fine over my VPS, it seems those specific hosts (like 103.151.118.2) either drop UDP packets from datacenter/VPS IP ranges or have strict firewall rules. Thanks for confirming it's not an issue with my game client!
 
Link to comment
Share on other sites

verci look into topic under urs. i wrote there how to fix.
in short: u need route xmpp via some encrypted tunnel, but udp traffic route directly, past a vpn. it'll solve ur case. if u have openwrt router with claude, it's 5 mins adventure

Edited by kheeva
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...