Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] linux server - won't start question

#1
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
Reply

#2
-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.
Reply

#3
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
Reply

#4
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.
Reply

#5
(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
Reply

#6
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?
Reply

#7
(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.
Reply

#8
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.
Reply

#9
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?
Reply

#10
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!
Reply

#11
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)
Reply

#12
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
Reply

#13
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 ).
Reply

#14
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!
Reply

#15
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
Reply

#16
Have a look at this: http://aperiodic.net/screen/multiuser

EDIT: Or let peter su as xonotic.
Reply

#17
///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.
Reply

#18
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.
Reply

#19
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.
Reply

#20
Chowning the tty is not the only solution to the problem as you can see above. But yes, do as you wish.
Reply

#21
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.
Reply

#22
Eh, this first comment looked like a decent solution to me...
Reply

#23
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.
Reply

#24
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.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  I can't see my listen server on server list fnmain 1 1,178 10-07-2023, 07:28 AM
Last Post: Grimnack
  Server not visible on the server browser for others or me DankoLord 1 2,161 02-21-2023, 08:02 PM
Last Post: ballerburg9005
  Rcon2IRC [Mac/Linux] Mario 26 41,934 07-10-2022, 04:41 PM
Last Post: KingPimpCommander
  BaI server | South American Xonotic server (located in Chile) z411 0 3,180 01-02-2022, 11:36 PM
Last Post: z411
  Full server tutorial start-2-finish with maps & config from live server xonotic.us.to ballerburg9005 0 10,089 09-03-2021, 10:21 AM
Last Post: ballerburg9005
  Server does not start saddesad 2 2,629 11-25-2020, 04:39 AM
Last Post: saddesad
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 5,512 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [NEED HELP] Server dont appear in server browser abslimit 0 2,817 03-15-2020, 04:13 AM
Last Post: abslimit
  How to change server cfg on modified server veecho 4 4,930 04-24-2019, 08:15 PM
Last Post: BuddyFriendGuy
  Management Console for Linux servers MarisaG 1 2,732 09-17-2018, 03:59 AM
Last Post: MarisaG

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-