Cannot Connect to GMod DS

garrys-modhostingserver-administration

Console initialized.
Couldn't load shader dll: game_shader_generic_garrysmod_srv.soConVarRef mat_dxlevel doesn't point to an existing ConVar
Game_srv.so loaded for "Garry's Mod"
Setting breakpad minidump AppID = 4000
Initializing Steam libraries for secure Internet server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Logging into anonymous gameserver account.
Fetching Workshop Addons.. No -authkey
Unknown command "cl_cmdrate"
Unknown command "cl_updaterate"
Unknown command "rate"
Network: IP 127.0.1.1, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Error loading cfg/trusted_keys_base.txt
Error loading cfg/pure_server_minimal.txt
PREP OK
ConVarRef room_type doesn't point to an existing ConVar
Executing dedicated server config file server.cfg
Map cycle file 'cfg/mapcycle.txt' was not found.
Nav File is wrong or something (4)
Initializing Steam libraries for secure Internet server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Logging into anonymous gameserver account.
Connection to Steam servers successful.
   Public IP is ----------.
Assigned anonymous gameserver Steam ID [A-1:3785689097(4531)].
VAC secure mode is activated.
Fri Aug  8 00:22:28 EDT 2014: Server Quit

This is what I get when I start my dedicated server. It is displayed in my LAN listed servers. I portforwarded ports 27015, 27005, 27030, 27020, and a few others, both TCP and UDP, traffic should be coming through, I triple checked everything and even did a little bit of trouble shooting. I cannot connect to the server when I get out of my LAN and friends cannot join the game, it doesn't show on the Internet server list. What concerns me is "[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed."

Thanks for any input.

— I also tried putting "+ip 192.168.xx.xx" in the execution line, I crashed in a loop giving me this console feed

david@corn:~/gmodds$ ./srcds_run -game garrysmod +maxplayers 32 +map gm_construct +ip 192.168.10.87
Auto detecting CPU
Using default binary: ./srcds_linux
Server will auto-restart if there is a crash.

Console initialized.
Couldn't load shader dll: game_shader_generic_garrysmod_srv.soConVarRef mat_dxlevel doesn't point to an existing ConVar
Game_srv.so loaded for "Garry's Mod"
Setting breakpad minidump AppID = 4000
Initializing Steam libraries for secure Internet server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Logging into anonymous gameserver account.
Fetching Workshop Addons.. No -authkey
Unknown command "cl_cmdrate"
Unknown command "cl_updaterate"
Unknown command "rate"
WARNING: NNET_OpenSocket: bind: Cannot assign requested address
Couldn't allocate any server IP port
Couldn't allocate any server IP port
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Fri Aug  8 00:22:35 EDT 2014: Server restart in 10 seconds

Best Answer

You can fix the error you where first having (before appending the IP bind) by running those commands:

cd ~/gmodds
echo "4020" > steam_appid.txt

Remove

+ip 192.168.xx.xx

from your command line since the errors in your second log come from that command.

After it shows

Connection to Steam servers successful.
   Public IP is ----------.

Your friends should try to directly connect to that IP instead of trying to find it in the server list. Sometimes Servers do not show up there, but are still connectable.

If you are determined, you can use this guide to find out more about the necessary things to be done to get listed.

The most important step, according to the guide, is to set your server location in the server.cfg. By default, it is set to -1, which would not list it.

Possible values are:

-1: Do not list server (also occurs when you do not set a value!)
0: East Coast USA.
1: West Coast USA.
2: South American Continent.
3: Europe.
4: Asia.
5: Australia.
6: Middle East.
7: Africa.
255: International / other location

This does not prevent anyone to connect to your server from a different region than the selected, it is only used for the filter.