Half-Life 2: Deathmatch

Half-Life 2: Deathmatch

dave2 Nov 13, 2015 @ 5:42am
[SOLVED] I can't connect to my own dedicated server, but other players can connect
Hello everybody!

Yesterday I brought HL2:DM and I started to create a server based on this guide. After I configured the server.cfg file, I successfully port-forwarded the necessary ports and started the server.

Then my friends joined to the server but I can't, because it said: "Connection failed after 4 retries."

Is there any solution?

Technical informations:
I downloaded the server by SteamCMD as it is written in the guide.
  • internal IP: 192.168.0.102
  • command-line:
    srcds.exe -console -game hl2mp -ip 192.168.0.102 +port 27020 +maxplayers 5 +exec server.cfg +map dm_overwatch


UPDATE [3/18/2017]:
The proble was simple! If you create your server with your profile, you can't connect to your server (because you can't be server and client in the same time!). I used my 2nd profile and I can connect to my server!
Last edited by dave2; Mar 18, 2017 @ 2:21am
< >
Showing 1-12 of 12 comments
Umbrella Man Nov 13, 2015 @ 7:09am 
If you are running client on the same machine with server, then you need to connect to "127.0.0.1", or "localhost".
dave2 Nov 13, 2015 @ 11:34am 
Originally posted by heater:
If you are running client on the same machine with server, then you need to connect to "127.0.0.1", or "localhost".

I tried, same error.

In fact, I can see my server in "LAN" section, despite it is not LAN server.
Umbrella Man Nov 13, 2015 @ 10:22pm 
192.168.0.102 is local address, so, it is LAN server. And if you are able to see your server in server browser, then you should be able to connect to it.
dave2 Nov 17, 2015 @ 11:30am 
Originally posted by heater:
192.168.0.102 is local address, so, it is LAN server. And if you are able to see your server in server browser, then you should be able to connect to it.
I see in the server list, but it refuses to connect after 4 retries.
Calion Jun 18, 2016 @ 10:36pm 
Resurrecting this as I am having the same problem.

I am hosting and others are able to join but i cannot join my own server.

Tried the suggestions above about localhost and the loopback ip but nothing works. This wasn't an issue when using the old Source SDK servers.

Config - C:\HL2MP\srcds.exe -console -game hl2mp +port 27015 +hostip 72.230.163.106 +maxplayers 8 +exec server.cfg +map dm_dodge_gravity
Last edited by Calion; Jun 18, 2016 @ 10:47pm
Admiral Crunch Jul 4, 2016 @ 3:41pm 
Bump. I haven't tried to play DM since March, but wanted to see if anyone had successfully used the above instructions to both join thier own game and have a friend do so as well. I can see and join my own map, but the other player cannot, even though he can see that I am playing DM on Steam and attempts to join.
Last edited by Admiral Crunch; Jul 9, 2016 @ 8:47am
Neidermeyer Mar 17, 2017 @ 3:24pm 
Seems like I managed to make it visible both for me and for friends. I run srcds.exe with just "-game hl2mp" parametr
Humλm Mar 17, 2017 @ 10:35pm 
^ Wait for 2018
Last edited by Humλm; Mar 17, 2017 @ 10:35pm
dave2 Mar 18, 2017 @ 2:18am 
I solved it! The problem was simple! You can't use your profile to play if you're the server. When I connect with my 2nd profile, it worked like a charm.
Peter Brev Mar 18, 2017 @ 6:33am 
If you use your machine to host the server, you will need to connect as anonymous. If you try to connect using your account with the server, you won't be able to connect. That's why you use an alt account, and a server box for hosting (preferably with Linux).
Last edited by Peter Brev; Mar 18, 2017 @ 6:33am
Adrián Mar 18, 2017 @ 7:46am 
Please few people stop saying false things, you can connect to the dedicated server hosted on your own pc while being on your steam account. Otherwise it's weird but stop messing with the IP command line parameters, that's completely useless since it should work once port fowarding is done, firewall enter rules allowing the host_port (default 27015) and other "doors" are correctly filtered.

But you need to know very simple rules that people don't know / forget, like: if you start the game first, it will make that port busy, making the dedicated server jump to the next available one (27016), therefore you would need that port opened (on firewall too). Of course you need to check what is the public IP but that's all. I also hope the day where people learns what a private / LAN IP is, against what a public IP is, comes.

Note: after all is correctly set, it shouldn't matter whether the private IP / loopback IP / public IP is used by the hoster to connect to his own server on the most cases, despite there might be some exceptions caused by the network. Remember external players need to use the public IP.
Last edited by Adrián; Mar 18, 2017 @ 7:58am
Originally posted by n0tfeuer:
I don't get it. I have the very exact problem, but I only have 1 steam account. So what can I do?
If you have not got a answer yet,,,i am a home hl2dm server and i used anonymous
as said here https://steamcommunity.com/sharedfiles/filedetails/?id=276053759
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Nov 13, 2015 @ 5:42am
Posts: 12