Cannot connect to my own dedicated Gmod server

Solution 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.

Solution 2:

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.

Solution 3:

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.

Solution 4:

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.