Enterprise hosting · Built for gamers
Garry's Mod – Common Errors and How to Fix Them
Quick answer: This guide solves a specific server problem step by step – not just theory. For connection, startup or performance issues see troubleshooting below and related guides.
This guide shows you the most common problems on Garry's Mod servers and how to fix them step by step. From Lua errors to connection problems to crashing addons – you'll find the solution here.
1. Lua Errors – The Most Common Error of All
Lua errors occur when an addon contains faulty code or collides with other addons. They appear as red error messages in the server console or on the client.
Recognizing Errors
[ERROR] addons/my_addon/lua/autorun/server/sv_my_script.lua:23: attempt to index a nil value
[ERROR] addons/my_addon/lua/weapons/my_weapon/shared.lua:156: 'end' expected (to close 'function' at line 12) near '<eof>'
Causes and Solutions
- Missing dependencies: Many addons require other addons as a foundation (e.g. Wiremod, ULX, DarkRP). Check the Workshop page of the addon for "Required Items"
- Wrong load order: Some addons must be loaded before others. In the Workshop Collection you can adjust the order via drag-and-drop
- Outdated addons: An addon hasn't been updated in years and is incompatible with the current GMod version. Check the last update date in the Workshop
- Duplicate addons: Two different versions of the same addon are installed. Search your
addons/folder for duplicates
Finding the Error Source
- Disable all non-essential addons
- Start the server and check if the error is still there
- Reactivate addons one by one until the error occurs
- The last activated addon is the culprit
2. Server Not Showing in the Server List
The most common reason why players can't find your server.
Causes and Solutions
- Port not forwarded: UDP port 27015 must be open in firewall and router. Check with:
# On the server itself netstat -an | grep 27015 # Check from outside (on another computer) nmap -sU -p 27015 your-server-ip - sv_lan set incorrectly:
sv_lan 0must be in server.cfg. Withsv_lan 1the server only appears on LAN - Server behind CGNAT: Some ISPs use CGNAT (Carrier-Grade NAT) – then your server has no public IP. Solution: Use a VPS or root server at NexoraHost
- Firewall blocks query: In addition to port 27015, the query port (usually 27016) must also be open. Open UDP 27016 as well
3. "Connection failed after 4 retries"
This error appears for players trying to join your server.
Causes and Solutions
- Server not running: Check if the server process is active:
# Windows tasklist | findstr srcds # Linux ps aux | grep srcds - Wrong IP or port: The player is using the wrong IP or port. Correct syntax:
connect 123.123.123.123:27015 - Server full:
maxplayersreached? Check the console or increase the limit - Outdated client version: The player must update GMod to the same version as the server
- Server in LAN mode: Check
sv_lan 0in server.cfg
4. "Failed to download addon"
Players see this message when the server cannot transfer custom files.
Causes and Solutions
- FastDL incorrectly configured: If you use FastDL, check if the URL is correct and the web server is running:
# In server.cfg – check FastDL URL sv_downloadurl "http://your-domain.com/fastdl/" - Files missing on FastDL: All addons and maps must be present on both the game server and the FastDL server
- No FastDL set up: Without FastDL, the server loads the files itself – this is slow. Set up FastDL (see Performance Guide)
- Files too large: Individual files over 150 MB often cause problems. Increase net_splitpacket_maxrate:
net_splitpacket_maxrate 100000
5. Server Crashes on Startup or After a Short Time
Causes and Solutions
- Missing libraries (Linux):
# Install all required 32-bit libraries sudo apt install -y lib32gcc-s1 lib32stdc++6 lib32z1 lib32ncurses6 lib32bz2-1.0 - Faulty addon: A broken addon crashes the server immediately. Remove all addons from the
addons/folder and add them back one by one - Map defective: Try switching to a default map like
gm_construct - Insufficient RAM: The server needs more RAM than available. Check RAM usage with
htop - Too many addons: Hundreds of addons overwhelm the server. Limit to a maximum of 50-100 addons
6. "Steam Auth Timeout" or "No Steam Logon"
Causes and Solutions
- Steam servers unreachable: The server cannot authenticate with Steam. Usually a temporary problem – wait and try again
- Firewall blocking Steam: Steam needs outgoing connections on ports 27014-27050 (TCP). Make sure outgoing connections are allowed
- Server token missing: Some servers require a Game Server Login Token (GSLT). Create one at steamcommunity.com/dev/managegameservers with App ID 4000
- Set token in startup script:
+sv_setsteamaccount YOUR_GSLT_TOKEN
7. Players Get Randomly Kicked ("Timed out")
Causes and Solutions
- Network timeout too short: Increase the timeout values in server.cfg:
sv_timeout 120 net_maxroutable 1260 net_earliertempents true - Server overloaded: CPU load or RAM full – check with
htop - Bandwidth exhausted: Too many players for the available upload bandwidth. Plan about 0.5-1 Mbps per player
8. "VAC banned from secure server"
Causes and Solutions
- Player has VAC ban: The player was VAC banned in another game. In server.cfg:
sv_kickbanneduser 0 # Allow VAC-banned players to join (not recommended) - VAC system unreachable: Rare – wait and try again later
9. Map Won't Change or Loads Forever
Causes and Solutions
- Map not installed: The map file is missing from the
maps/folder. Workshop maps are downloaded automatically when the collection is linked - Map too large: Very large maps take a long time to load – be patient or choose a smaller map
- Map corrupted: Map is damaged. Download again or use a different map
10. General Debugging Tips
# Start server with detailed logging
-condebug +log on
# Check log file
cat garrysmod/console.log | grep -i error
# Show current addon errors
cat garrysmod/console.log | grep "addons/" | grep -i error
# Watch server console live (Linux)
tail -f garrysmod/console.log
Quick Checklist for Problems
- Check server console for red ERROR messages
- Disable all addons for testing and start server without addons
- Check firewall and port forwarding (UDP 27015, 27005, 27016)
- Check
sv_lan 0in server.cfg - Sufficient RAM and CPU available? (
htop) - All required libraries installed? (Linux)
- FastDL URL reachable and correct?
- Restart server – many temporary problems disappear afterwards
NexoraHost
Order your game server
Minecraft, ARK, FiveM & 24+ games – 1-click install, mods allowed, from €4.99/mo.
nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime