8

I can open the console in Gmod and use the command connect to try to join "localhost", "127.0.0.1", and "{my_ip_address}". However, these all show me a dialog box that says "Connection failed after 4 retries".

I have my server installed on Ubuntu 13.04. I wrote a little startup script to optionally update the server and then call this line:

./$GMOD_DIR/srcds_run -game garrysmod +maxplayers $MAX_PLAYERS +map $MAP

Where $GMOD_DIR is ${SERVER}/gmod/, $MAX_PLAYERS is 4, and $MAP is gm_construct.

It gives me this output:

Auto detecting CPU
Using default binary: ./srcds_linux
Server will auto-restart if there is a crash.

Console initialized.
ConVarRef 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
Logging into anonymous gameserver account.
Fetching Workshop Addons.. No -authkey
Network: IP 127.0.1.1, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Unable to persist cache 'modelsounds.cache', check file permissions
Error loading cfg/trusted_keys_base.txt
Error loading cfg/pure_server_minimal.txt
PREP OK
Lua JIT is DISABLED!
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.
Unable to persist cache 'modelsounds.cache', check file permissions
Nav File is wrong or something (4)
Initializing Steam libraries for secure Internet server
Logging into anonymous gameserver account.
Server logging enabled.
Unable to open logfiles under logs/L0714
Logging disabled
Connection to Steam servers successful.
   Public IP is (omitted).
Assigned anonymous gameserver Steam ID [A-1:3885134849(3517)].
VAC secure mode is activated.

I am mostly concerned with these lines:

Lua JIT is DISABLED!

I'm assuming this is some reference to Lua/Java Just In Time compiler

Nav File is wrong or something (4)

No idea what this is. Google didn't help very much.

Server logging enabled.
Unable to open logfiles under logs/L0714
Logging disabled
1
  • For LuaJIT, try this: facepunch.com/showthread.php?t=1167102 However, I had that error on my old GMod server and it didn't have any problems running. Unable to open logfiles might be if you haven't set read permissions or so. Nav File is wrong or something is most likely just a map that misses a Nav file. Also, it seems to be setting itself at IP 127.0.1.1, and not 127.0.0.1 (which might be why you can't connect to that one) Try use "status" in the console. Edit: crap, thought enter would work for new lines. q_q
    – prk
    Commented Oct 1, 2014 at 23:05

5 Answers 5

1

The port could have changed to 27016 instead of the default 27015 since you are using 'connect' try going into 'Find Multiplayer Game' then into 'Local Area Network' and find your server there.

1

Add +ip 192.168.x.x to the line that starts the server in the script. Change 192.168.x.x to whatever the server's internal IP address is, as this is just an example. This can be found by typing ifconfig in Terminal. This shouldn't matter when trying to connect locally, but gmod might not like connections if a gateway isn't explicitly stated.

1
  • ifconfig is the unix command Commented Jul 3, 2014 at 13:50
1

Your server has started normally. The Lua JIT interpreter might be disabled due to a missing dependency. Make sure that you have the Lua binary and devel packages off of apt-get.

I run a dedicated Garry's Mod server off of my local computer. In order to connect to my own server, I needed to use my external IP address to connect. Try connect <your external>:27015.

EDIT: The Lua JIT interpreter is disabled by default on purpose due to FPS issues. If you want to turn it on, add -withjit to your launch command.

1

Are you logged in as root? If not, try using sudo.

sudo ./$GMOD_DIR/srcds_run -game garrysmod +maxplayers $MAX_PLAYERS +map $MAP

Your worry about Lua JIT is probably nothing. What concerns me is this line: Unable to persist cache 'modelsounds.cache', check file permissions

Given that your script doesn't have permission to use the file, and that you "can't find" files in your cfg directory, leads me to believe you need to run this with advanced privileges.

This is analogous to running an app "As Administrator" in Windows.

0

You can also try disable firewall and test if this allows you to connect to server. If you haven't changed ports it should be this ones. 27015 and 27005 both TCP and UDP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.