How to fix the error “Connection Failed After 4 Retries”

garrys-modserver-administration

I am trying to make a Gmod server, and believe I have everything set up correctly. I am using SteamCMD. I port forwarded all TDP/UDP between 27000 and 27050. I also port forwarded these ports in my firewall.

However, my server doesn't show up on the list after I start it, and when I type "connect xx.xx.xxx.xxx" it says "Connection failed after 4 retries."

How would one fix this?

Best Answer

Are you running the server on a local machine at your place? In that case, try using internal LAN address to connect to it. If that still fails, the issue is with your computer's firewall, possibly. Try disabling it momentarily and connect to the server again. If that also fails, then the problem is most likely with SteamCMD. Check that you haven't accidentally changed the ports it's supposed to use.

If your server is on a computer with Gmod installed, try connecting to 127.0.0.1. This is the notorious loopback address, and makes the computer connect to itself. If that fails, then the problem is with SteamCMD. Like mentioned above, check that you haven't accidentally changed the ports it's supposed to use.

If all else fails, try using the HLDSUpdateTool instead. Although aging, and about to be phased out, it is still a viable alternative.