[SOLVED] linux server - won't start question - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3) +--- Forum: Xonotic - Server Administration (https://forums.xonotic.org/forumdisplay.php?fid=16) +--- Thread: [SOLVED] linux server - won't start question (/showthread.php?tid=2862) |
linux server - won't start question - nonenone - 04-09-2012 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 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 RE: linux server - won't start question - Mr. Bougo - 04-09-2012 -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. RE: linux server - won't start question - nonenone - 04-09-2012 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/ 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 RE: linux server - won't start question - Mr. Bougo - 04-09-2012 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=xonotic&server=1.2.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. RE: linux server - won't start question - nonenone - 04-09-2012 (04-09-2012, 12:15 PM)Mr. Bougo Wrote: Telnet is TCP, you won't be able to establish a connectionI 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=) The installation instructions assume that the user would install these files with a relaxed umask (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 RE: linux server - won't start question - Mr. Bougo - 04-09-2012 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? RE: linux server - won't start question - nonenone - 04-09-2012 (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). 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 ^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. RE: linux server - won't start question - Mr. Bougo - 04-09-2012 Is your outbound traffic policy as restrictive as your filesystem policy? 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. RE: linux server - won't start question - nonenone - 04-09-2012 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? RE: linux server - won't start question - Mr. Bougo - 04-09-2012 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! RE: linux server - won't start question - nonenone - 04-09-2012 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 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 ) RE: linux server - won't start question - Mr. Bougo - 04-09-2012 Having STDOUT in both console.log and server.log isn't exactly tidy either 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 RE: linux server - won't start question - nonenone - 04-10-2012 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 ). RE: linux server - won't start question - Mr. Bougo - 04-10-2012 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! RE: linux server - won't start question - nonenone - 04-10-2012 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 RE: linux server - won't start question - Mr. Bougo - 04-10-2012 Have a look at this: http://aperiodic.net/screen/multiuser EDIT: Or let peter su as xonotic. RE: linux server - won't start question - nonenone - 04-10-2012 ///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. RE: linux server - won't start question - Mr. Bougo - 04-10-2012 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/start-screen-after-sudo-su-to-another.html EDIT: read the comments maybe. RE: linux server - won't start question - nonenone - 04-10-2012 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. RE: linux server - won't start question - Mr. Bougo - 04-10-2012 Chowning the tty is not the only solution to the problem as you can see above. But yes, do as you wish. RE: linux server - won't start question - nonenone - 04-10-2012 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. RE: linux server - won't start question - Mr. Bougo - 04-10-2012 Eh, this first comment looked like a decent solution to me... RE: linux server - won't start question - nonenone - 04-10-2012 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. RE: linux server - won't start question - Mr. Bougo - 04-10-2012 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. |