"Connection failed after 4 retries"

This is such an annoying glitch… I want to play on the same game server as my friend, and when I click join, it tries to join, and then it says “Connection failed after 4 retries” I have tried resetting my steam, and Gmod, and it still does not work. Any suggestions?