source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Heartbeat command not working on listen servers

Open jan-h opened this issue 13 years ago • 2 comments

With our mod we're experiencing another strange listen server issue - the heartbeat command does not work at all. Here's the story:

Everything compiles well and things are being tested on my Windows development machine. This machine has a Steam install with Source SDK Base 2013 MP and a separate dedicated server installation. Both of them find the sourcemods folder, which in turn means that the listen and dedicated server not only just use the exact same .dll files, they also use the exact same game resources. Now, when I run the dedicated server it does not matter if it's an Internet or LAN server (sv_lan set to 0 or 1), whenever I run the heartbeat command I can see a network packet being sent out to the master server when I take a look at the network dump in Wireshark. When I do the same in the listen server it still does not matter what sv_lan is set to - executing heartbeat from the console does never send out a network packet. This is a problem because this way listen servers never get advertised on the master servers. I have also noticed that the dedicated server always shows up on the Internet and LAN tabs in the in-game and Steam server browser, the listen server never shows up anywhere.

Firewalls and port forwardings aren't the issue here, the explanation follows. When I compile the MP demo project and run it, the dedicated server behaves as described above. Additionally the listen server works just in the same way, running heartbeat sends out a packet to the master server regardless of the sv_lan setting and the server is shown in both server browsers on both tabs. Since our mod and the demo project use the same ports and hl2.exe binaries we can rule out firewalls and port forwardings.

At least to me it also seems unlikely that there's an issue with our mod code as it works like a charm when used with the standalone dedicated server (installed via SteamCMD by the way) - remember, it uses the exact same files as the listen server does.

To me this looks like something is missing from our mod which is required by the listen server to work correctly but not required by the dedicated server. Additionally this missing piece of information must be part of the demo project, as there are no such problems with it. I've looked through everything multiple times but can't get put my finger on it. If someone knew what is checked by the heartbeat command before actually sending a network packet on its way I could easily see what's missing for our mod.

jan-h avatar Sep 19 '13 18:09 jan-h

Found what's causing the issue, cutting to the point here: my config.cfg had the line

commentary "1"

When I set it to 0 the listen server registers with the master server and the heartbeat command works flawlessly. This is more an issue on my side here, but the standalone dedicated server seems to ignore this setting. Maybe Source SDK Base 2013 Multiplayer should be updated to ignore this setting as well.

jan-h avatar Sep 24 '13 12:09 jan-h

Dedicated servers ignore it since you cannot load commentary mode on a dedicated server. It's a single-player feature even if in a multi-player game, and thus only for listen servers that aren't meant to be joinable. Hiding from the master sounds like the correct behavior in that case.

psychonic avatar Sep 24 '13 12:09 psychonic