Xonotic is a free, open source (GPL) ultra-fast, first-person shooter


Follow Xonotic on

Post Reply 
linux server - won't start question
04-09-2012, 08:36 AM (This post was last modified: 04-10-2012 04:40 AM by Mr. Bougo.)
Post: #1
Question linux server - won't start question
Hi there,


For some reason it won't find its files. I suppose the -basedir varible should be set. I should rather set it in the ~xonotic dir, and not in the installation dir as this makes upgrades easier.


Code:
xonotic@srv44:~$ cd /usr/local/Xonotic/ && /usr/local/Xonotic/server/server_linux.sh
Game is Xonotic using base gamedir data
Xonotic Linux 17:18:25 Mar  8 2012 - release
Current nice level is below the soft limit - cannot use niceness
Skeletal animation uses SSE code path
couldn't exec quake.rc
couldn't exec default.cfg
couldn't exec config.cfg
couldn't exec autoexec.cfg
SpawnServer: no map file named maps/start.bsp
Host_Mingled: time stepped forward (went from 0.000000 to 1333978336.059511, difference 1333978336.059511)
^C

The server.cfg is copied over:
xonotic@srv44:~$ find ~xonotic/.xonotic/
/home/xonotic/.xonotic/
/home/xonotic/.xonotic/data
/home/xonotic/.xonotic/data/server.cfg
/home/xonotic/.xonotic/server.log

I thinks it's something simple to solve, but I cannot work out where to look.

Cheers in advance.
O
Find all posts by this user
Quote this message in a reply
04-09-2012, 09:09 AM
Post: #2
RE: linux server - won't start question
-basedir should be the install directory. It specifies the main data dir. The personal data dir can be manually set with -userdir. It defaults to ~/.xonotic on *nix systems.

Where are your installed pk3 data files? Their directory is where you should load the game from, or use with -basedir.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-09-2012, 11:10 AM (This post was last modified: 04-09-2012 12:05 PM by nonenone.)
Post: #3
RE: linux server - won't start question
In here:
# find /usr/local/xonotic/data/
/usr/local/xonotic/data/
/usr/local/xonotic/data/xonotic-20120308-music.pk3
/usr/local/xonotic/data/font-xolonium-20120308.pk3
/usr/local/xonotic/data/font-nimbussansl-20120308.pk3
/usr/local/xonotic/data/xonotic-20120308-nexcompat.pk3
/usr/local/xonotic/data/xonotic-20120308-data.pk3
/usr/local/xonotic/data/xonotic-20120308-maps.pk3

More details with sh -x:
Code:
$ cd /usr/local/xonotic/
$ /usr/local/xonotic/server/server_linux.sh
+ uname -m
+ executable=xonotic-linux64-dedicated
+ dirname /usr/local/xonotic/server/server_linux.sh
+ cd /usr/local/xonotic/server
+ [ -x xonotic-linux64-dedicated ]
+ [ -x ../xonotic-linux64-dedicated ]
+ [ -f /home/xonotic/.xonotic/data/server.cfg ]
+ cd ..
+ exec ./xonotic-linux64-dedicated +serverconfig server.cfg
Game is Xonotic using base gamedir data
Xonotic Linux 17:18:25 Mar  8 2012 - release
Current nice level is below the soft limit - cannot use niceness
Skeletal animation uses SSE code path
couldn't exec quake.rc
couldn't exec default.cfg
couldn't exec config.cfg
couldn't exec autoexec.cfg
SpawnServer: no map file named maps/start.bsp
Host_Mingled: time stepped forward (went from 0.000000 to 1333987882.611574, difference 1333987882.611574)

Solved. The unpacked permissions on the data directory are 750.
drwxr-x--- 2 root root 4096 Apr 9 15:03 data/

so changed the gid to xonotic.
drwxr-x--- 2 root xonotic 4096 Apr 9 15:03 data/

Game starts, but can anyone comment on this message shown below:
FS_OpenVirtualFile("data/maps/.mapinfo", false): nasty filename rejected

The service is listening:
# lsof -i udp:26000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
xonotic-l 12553 xonotic 10u IPv4 1677800 0t0 UDP *:26000
xonotic-l 12553 xonotic 11u IPv6 1677801 0t0 UDP *:26000

But cannot be connected to:
# telnet 1.2.3.4 26000
Trying 1.2.3.4...
telnet: Unable to connect to remote host: Connection refused

Nmap states the port is open, yet the service is unlisted on the server lists.
I wonder how long it takes to propergate.
Interesting ports on b.b.c (1.2.3.4):
PORT STATE SERVICE
26000/udp open|filtered quake




Where does the server.log get written to by default?
I should prefer it logging via syslog.




Code:
$  /usr/local/xonotic/server/server_linux.sh
Game is Xonotic using base gamedir data
Xonotic Linux 17:18:25 Mar  8 2012 - release
Current nice level is below the soft limit - cannot use niceness
Skeletal animation uses SSE code path
execing quake.rc
execing default.cfg
execing defaultXonotic.cfg
Warning: Could not expand $vid_width
Warning: Could not expand $vid_height
Warning: Could not expand $vid_pixelheight
execing sRGB-disable.cfg
menu: program is not loaded
execing weapons.cfg
Warning: Could not expand $r_showsurfaces
Warning: Could not expand $r_ambient
Warning: Could not expand $gl_finish
Warning: Could not expand $vid_gl20
Warning: Could not expand $vid_gl13
Warning: Could not expand $r_drawviewmodel
execing cdtracks.cfg
execing balanceXonotic.cfg
execing ctfscoring-ai.cfg
execing effects-normal.cfg
execing physicsX.cfg
execing turrets.cfg
execing unit_machinegun.cfg
execing unit_hk.cfg
execing unit_hellion.cfg
execing unit_mlrs.cfg
execing unit_flac.cfg
execing unit_fusreac.cfg
execing unit_plasma.cfg
execing unit_plasma2.cfg
execing unit_tesla.cfg
execing unit_phaser.cfg
execing unit_walker.cfg
execing unit_ewheel.cfg
execing vehicles.cfg
execing vehicle_racer.cfg
execing vehicle_raptor.cfg
execing vehicle_spiderbot.cfg
execing vehicle_bumblebee.cfg
execing crosshairs.cfg
execing commands.cfg
Warning: Could not expand $qport in alias _if_dedicated
execing _hud_common.cfg
execing _hud_descriptions.cfg
execing hud_luminos.cfg
couldn't exec config.cfg
"maxplayers" set to "16"
execing data/campaign.cfg
execing config_update.cfg
execing font-xolonium.cfg
Warning: Could not expand $scr_loadingscreen_barheight
Warning: Could not expand $scr_infobar_height
Warning: Could not expand $scr_centersize
This command only works on clients: cl_cmd hud scoreboard_columns_set
execing autoexec/empty.cfg
execing autoexec.cfg
Loaded public key key_0.d0pk (fingerprint: Xon//KssdlzGkFKdnnN4sgg8H+koTbBn5JTi37BAW1Q=)
Generated private ID key_0.d0pk (public key fingerprint: /Bnxv4SFbOfxVC8uY7U6wuJ0f0m61JHxEi56FcW3Nok=)
Saved unsigned key to key_0.d0si
Signature generation in progress...
Server using port 26000
Server listening on address 0.0.0.0:26000
Server listening on address [0:0:0:0:0:0:0:0]:26000
execing server.cfg
maxplayers can not be changed while a server is running.
It will be changed on next server startup ("map" command).
"maxplayers" set to "32"
Game type successfully switched to dm
Host_Mingled: time stepped forward (went from 0.000000 to 1333989893.265136, difference 1333989893.265136)
FS_OpenVirtualFile("data/maps/.mapinfo", false): nasty filename rejected
FS_OpenVirtualFile("maps/.mapinfo", false): nasty filename rejected
FS_OpenVirtualFile("data/maps/autogenerated/.mapinfo", false): nasty filename rejected
FS_OpenVirtualFile("maps/autogenerated/.mapinfo", false): nasty filename rejected
FS_OpenVirtualFile("data/maps/.ent", false): nasty filename rejected
FS_OpenVirtualFile("maps/.ent", false): nasty filename rejected
FS_OpenVirtualFile("data/maps/.bsp", false): nasty filename rejected
FS_OpenVirtualFile("maps/.bsp", false): nasty filename rejected
Maplist contains no single playable map!  Resetting it to default map list.
menu: program is not loaded
Server using port 26000
Server listening on address 0.0.0.0:26000
Server listening on address [0:0:0:0:0:0:0:0]:26000
Received signature for private ID key_0.d0pk (public key fingerprint: /Bnxv4SFbOfxVC8uY7U6wuJ0f0m61JHxEi56FcW3Nok=)
Saved to key_0.d0si
Find all posts by this user
Quote this message in a reply
04-09-2012, 12:15 PM (This post was last modified: 04-09-2012 12:19 PM by Mr. Bougo.)
Post: #4
RE: linux server - won't start question
Telnet is TCP, you won't be able to establish a connection with a Xonotic server with that. Use netcat instead. Or better, the actual xonotic client. Or QStat, or any rcon program/script. You can use this: http://dpmaster.deathmask.net/?game=xono....3.4:26000 (adjust IP and port accordingly)

There's no syslog logging available. I'm not sure if that would meet syslog's purpose, honestly.

server.log is written in the personal data directory, as are databases and every other file. The install directory is left intact if a personal directory is used. Check the user's ~/.xonotic/data.

EDIT: The command "heartbeat" manually advertises the server to the master server. That should not be necessary, it should happen on startup and be instantly visible.

As for the FS_OpenVirtualFile errors, I'm guessing it's a small bug due to the maplist being empty. I guess some loop iterates over the g_maplist cvar and assumes there's at least one, the map name ends up being empty and it checks for "maps/$mapname.bsp" which would be "maps/.bsp". DarkPlaces has a hardcoded protection that prevents the gamecode from touching hidden dot-files, so it throws that warning. Nothing harmful.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-09-2012, 12:26 PM
Post: #5
RE: linux server - won't start question
(04-09-2012 12:15 PM)Mr. Bougo Wrote:  Telnet is TCP, you won't be able to establish a connection
I realised this, and used nmap -Su and the port is open.

Current;y the server spits out this error:
Code:
Received signature for private ID key_0.d0pk (public key fingerprint: /Bnxv4SFbOfxVC8uY7U6wuJ0f0m61JHxEi56FcW3Nok=)
Saved to key_0.d0si
Got response from weapon stats server:
  NOTE: Empty match discarded
End of response.
Weapon stats written
Saving persistent data...
Can't write DB to server.dbdone!
I know why. Permissions on .xonotic/data are 750 and owner root:xonotic
The installation instructions assume that the user would install these files with a relaxed umask Wink

(04-09-2012 12:15 PM)Mr. Bougo Wrote:  server.log is written in the personal data directory, as are databases and every other file. The install directory is left intact if a personal directory is used. Check the user's ~/.xonotic/data.
I did, and there is a server.log file, but its empty.


Cannot find the heartbeat command - Where is it?
# cd /usr/local/xonotic/
# find | grep heartb
Find all posts by this user
Quote this message in a reply
04-09-2012, 12:32 PM
Post: #6
RE: linux server - won't start question
It's a Xonotic command. It is to be typed in the server console (server process's STDIN, or rcon).

Did you set log_file in server.cfg? Is the server.log file writable?

Why is the server user's own home so restricted, if I may ask?

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-09-2012, 12:44 PM (This post was last modified: 04-09-2012 12:52 PM by nonenone.)
Post: #7
RE: linux server - won't start question
(04-09-2012 12:32 PM)Mr. Bougo Wrote:  It's a Xonotic command. It is to be typed in the server console (server process's STDIN, or rcon).

Did you set log_file in server.cfg? Is the server.log file writable?

Why is the server user's own home so restricted, if I may ask?

Just my own best practices for anything I run. If I cannot chroot it, then I run it on its own LV mounted nosuid nodev and with restrictive permissions.

I enabled the log_file in the server.cfg. Thank-you. I missed this one:

Rather nasty error in the log file:
^7server: 274 new entities parsed, 0 new inhibited, 165 (274 new) spawned (whereas 189 removed self, 85 stayed)
^7Server spawned.
^7LHNET_Write: sendto returned error: Network is unreachable

Although, its up Big Grin

^7LHNET_Write: sendto returned error: Network is unreachable
^7Client "Casseur" dropped
^7^4Casseur^4 disconnected
^7relink: 1 bots seen.
^7Client "[BOT]Eureka" dropped
^7^4[BOT]Eureka^4 disconnected
^7relink: 0 bots seen.
Find all posts by this user
Quote this message in a reply
04-09-2012, 12:53 PM
Post: #8
RE: linux server - won't start question
Is your outbound traffic policy as restrictive as your filesystem policy? Smile
I guess it's trying to advertise itself to the master server and fails to do so. I don't know the protocol. Apparently, master servers listen on port 27950.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-09-2012, 12:56 PM (This post was last modified: 04-09-2012 12:58 PM by nonenone.)
Post: #9
RE: linux server - won't start question
Next step is to let is run:

For start up was am going to check this into /etc/init.d :

su - xonotic -c '/usr/local/xonotic/server/server_linux.sh > /home/xonotic/.xonotic/data/console.log 2>&1'

And then use truncatelog in logrotate for the logrotation.

What happens to the process if I send a SIGHUP?
Find all posts by this user
Quote this message in a reply
04-09-2012, 01:08 PM (This post was last modified: 04-09-2012 01:08 PM by Mr. Bougo.)
Post: #10
RE: linux server - won't start question
If I'm reading the source code right, it exits. It does that for SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGIOT, SIGBUS, SIGFPE, SIGSEGV, SIGTERM.

You don't need to redirect STDOUT server.log contains everything. Not sure about STDERR.

It's also good to have STDIN and STDOUT attached to a terminal, too. They can be used as an interactive console, as rcon has some shortcomings with output. Maybe you can use screen or tmux for that. But that's up to you!

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-09-2012, 01:13 PM (This post was last modified: 04-09-2012 01:23 PM by nonenone.)
Post: #11
RE: linux server - won't start question
This works;

su - xonotic -c '/usr/local/xonotic/server/server_linux.sh > /home/xonotic/.xonotic/data/console.log 2>&1'

I'll redriect it all, because its tidier than throwing it into the eather Big Grin

I cannot have it attached to a tty - It has to run in the background and kick off from init.d after server boot.

Mr. Bougo,

Thank-you very much for the time and work you did to help me get this server up and running. I really appreciate it.

Cheers.

(Next step is to find some truly large maps for 64 players Big Grin)
Find all posts by this user
Quote this message in a reply
04-09-2012, 01:23 PM (This post was last modified: 04-09-2012 01:24 PM by Mr. Bougo.)
Post: #12
RE: linux server - won't start question
Having STDOUT in both console.log and server.log isn't exactly tidy either Tongue

You could do su - xonotic -c 'screen -d -m /usr/local/xonotic/server/server_linux.sh'
That launches a detached screen session that you can then attach to as the user xonotic.

EDIT: You're welcome Big Grin

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-10-2012, 04:03 AM (This post was last modified: 04-10-2012 04:04 AM by nonenone.)
Post: #13
RE: linux server - won't start question
Hi,

Would a moderator amend the title of this thread by prefixing the title with [SOLVED], so that other readers know it is solved.

( Yep, running it via screen is a fine idea. screen -d -m added ).
Find all posts by this user
Quote this message in a reply
04-10-2012, 04:40 AM
Post: #14
RE: linux server - won't start question
Heh, I stickied this thread by accident. I don't know how that happens.

Anyway, I'll add [SOLVED]. You can do that yourself by editing the first post and selecting the [SOLVED] prefix in the subject!

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-10-2012, 07:32 AM
Post: #15
RE: linux server - won't start question
Just tried to re-attached to a screen, but of course screen creates a screen based on the user that creates process, yet the tty is owned by the user that logged in. Therefore this won't work:
xonotic@srv44:~$ screen -r 12469..logout
Cannot open your terminal '/dev/pts/0' - please check.
xonotic@srv44:~$ ls -l /dev/pts/0
crw------- 1 peter tty 136, 0 Apr 10 14:20 /dev/pts/0

Why?
Because I log into the server using my personal account (peter).
xonoic is a system account which is locked. To access one has to su to root, and then su to xonotic.
This leaves the tty with peter:tty.

I thought about chowning the tty afterwards with
chown xonotic /dev/`ps -ef|grep xonotic-linux64-dedicated|grep -v grep |awk '{print $6}'`
... but screen does not inherit this tty, but the one of the calling process. Damn.

I shall look into rcon

Screen does not
Find all posts by this user
Quote this message in a reply
04-10-2012, 07:46 AM (This post was last modified: 04-10-2012 07:47 AM by Mr. Bougo.)
Post: #16
RE: linux server - won't start question
Have a look at this: http://aperiodic.net/screen/multiuser

EDIT: Or let peter su as xonotic.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-10-2012, 08:19 AM
Post: #17
RE: linux server - won't start question
///EDIT: Or let peter su as xonotic. ////

Same problem - screen still points back to tty owned by peter instead, yet screen PID owner by xonotic.
Find all posts by this user
Quote this message in a reply
04-10-2012, 09:29 AM (This post was last modified: 04-10-2012 09:31 AM by Mr. Bougo.)
Post: #18
RE: linux server - won't start question
Oh right, I didn't recognize the issue but I ran into it before. There are some hacks around it, search google. I found this: http://dbadump.blogspot.com/2009/04/star...other.html
EDIT: read the comments maybe.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-10-2012, 09:45 AM (This post was last modified: 04-10-2012 09:46 AM by nonenone.)
Post: #19
RE: linux server - won't start question
Yep, I thought about chowning the tty, but one has to be root to do this.

From a startup scripting ppoint of view, it looks a little to much work to hunt down the calling user tty which is unrelated to the su - -c command, and then chown that.

rcon looks far easier for my needs.
Find all posts by this user
Quote this message in a reply
04-10-2012, 10:17 AM
Post: #20
RE: linux server - won't start question
Chowning the tty is not the only solution to the problem as you can see above. But yes, do as you wish.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-10-2012, 10:24 AM (This post was last modified: 04-10-2012 10:24 AM by nonenone.)
Post: #21
RE: linux server - won't start question
Like adding the user into the tty group - A little excessive as said user would be able to read other users ttys that it ought not access.

There were others, and the ones that I read decreased security, required root access and in my opinion were cumbersome.

Cheers.
Find all posts by this user
Quote this message in a reply
04-10-2012, 12:33 PM
Post: #22
RE: linux server - won't start question
Eh, this first comment looked like a decent solution to me...

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
04-10-2012, 12:46 PM
Post: #23
RE: linux server - won't start question
You refer to this?
" (enter screen command mode) CTRL-a : (allow multiuser) multiuser on

(enter screen command mode) CTRL-a : (grant access to users) addacl root"

Seems like a plan.
Find all posts by this user
Quote this message in a reply
04-10-2012, 03:10 PM
Post: #24
RE: linux server - won't start question
You can also pass commands to screen when you start the session from the CLI, so there is no user interaction required to set the ACL. Check the manpage.

[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [How to] Linux map file server end user 8 417 10-21-2014 04:13 PM
Last Post: Smilecythe
  Server via UGCC? Arbo 9 500 10-19-2014 03:58 PM
Last Post: Mr. Bougo
Thumbs Up [SOLVED] Create a server on DigitalOcean CJ25 8 564 09-14-2014 05:36 AM
Last Post: Mr. Bougo
Question How to start a Server with Mutators ? Wolfseye 1 457 07-08-2014 12:07 PM
Last Post: Mr. Bougo
  Turning on AES Support on the server? evit 8 1,953 06-01-2014 01:12 PM
Last Post: dipol
  [SOLVED] Stats failing to submit | FreeBSD server Pricetx 1 733 03-16-2014 03:31 PM
Last Post: Pricetx
  [SOLVED] Not attempting to generate keys | FreeBSD server Pricetx 3 780 03-16-2014 02:00 PM
Last Post: Pricetx
  [ Drive Mofo ] Vehicle CTF Server end user 5 1,352 03-01-2014 05:12 PM
Last Post: end user
  Server Question - CTF Topher 2 813 01-25-2014 03:22 PM
Last Post: Topher
  Some issues with 0.7.0 server -maniac|Su- 16 2,606 01-15-2014 04:29 PM
Last Post: -maniac|Su-

Forum Jump: