Fix: Master Server Heartbeat Failing / No Heartbeats Sent

May 21, 2025 Daemon666 8 min read 255 vizualizări

Your server runs, players who already have the IP can connect and play, but it never shows up in the in-game Internet tab or on community trackers. That is a master-server heartbeat problem: the server is not successfully announcing itself to Valve's master server, so nothing that queries the master list ever learns it exists. A heartbeat is a small UDP packet the game server sends the master roughly every few minutes; if it never arrives, you are invisible to everyone but people with your direct address.

1. Rule out sv_lan first

A LAN server does not heartbeat at all. This is the single most common cause and it is a one-line fix:

sv_lan 0

At 1 the engine skips the master entirely — no heartbeat is ever sent, by design. Put sv_lan 0 in server.cfg and read it back in the console with sv_lan (no argument) to confirm it stuck. A config executed after yours can flip it back, so check the live value, not just the file.

2. Set a region so the master accepts you

The master server buckets servers by region. Set it explicitly:

sv_region 255

255 means "world / unspecified" and is the safe default; the numbered regions (Europe, US East, and so on) also work but a wrong region hides you from players filtering by area. If sv_region is unset or garbage, some master builds refuse the listing.

3. Open UDP 27015 in BOTH directions

The heartbeat is outbound UDP from your server port (default 27015) to the master, and the master and clients then query you inbound on the same port. On a firewalled or NAT'd box you must allow both:

  • Outbound UDP from 27015 to the internet — without it the heartbeat never leaves.
  • Inbound UDP to 27015 — without it the master's reply and client A2S queries never arrive, so even a delivered heartbeat leads nowhere.

Behind a home router, forward UDP 27015 to the server's LAN IP. On a VPS, check the provider firewall and any local iptables/ufw rules. If the box has several IPs, bind explicitly with -ip on the command line so heartbeats leave from the address players can reach.

4. Force a heartbeat and watch the console

You do not have to wait for the timer. From the server console:

heartbeat

This sends an immediate announce. Run it with developer 1 set and watch for the challenge handshake — the master replies with a challenge the server must echo before it is listed. If you see the request go out but nothing comes back, the reply is being dropped inbound (step 3). If nothing goes out at all, you are still in LAN mode or bound to the wrong IP.

5. Inspect the master list itself

The engine keeps a list of master servers it talks to. Print it:

setmaster list

This shows the masters currently configured. If the list is empty — which happened to many servers around engine updates when a hardcoded master address changed — no heartbeat has anywhere to go. You can re-enable the built-in masters with:

setmaster enable

Do not paste random third-party master addresses from a forum; an unreachable or hostile master just wastes heartbeats. Stick to the engine's built-in Steam master unless you deliberately run your own.

Troubleshooting

  • Server plays fine but never lists — almost always sv_lan 1. Set it to 0 and re-check the live value.
  • Heartbeat goes out, server still not listed — inbound UDP 27015 is blocked, so the master cannot query you back. Test the port from outside with an A2S query tool.
  • Lists briefly, then drops off — heartbeats are arriving intermittently; a flaky NAT mapping or an aggressive firewall idle-timeout is dropping the outbound path between beats.
  • setmaster list is empty — run setmaster enable to restore the built-in masters, then heartbeat.
  • Wrong or double IP — a multi-homed box heartbeats from an address clients cannot reach. Pin it with -ip <public-ip> at launch.
  • Broke right after the 25th Anniversary update — that update changed engine networking and master handling; rolling the client/server to the steam_legacy branch is the known escape while you sort compatibility.

Verification

With developer 1, run heartbeat and confirm you see the announce leave and a challenge return. Then, from a different machine or network (not the server's own LAN), open CS, go to the Internet tab, and filter by your server name or the map it is running. If it appears, the round trip works. As a lower-level check, use an external A2S query against <your-ip>:27015 — a valid info reply proves inbound UDP is open, which is the half people most often miss. Once it lists reliably, confirm the essentials with the essential cvars guide so a later config edit does not silently flip sv_lan back.

Contribuitori: Daemon666 ✦
Distribuie: