Page 1 of 1

Starting server - Failed (exit = 2)

Posted: Mon Oct 21, 2019 9:51 am
by Knox
Hey, so I wanted to start a server, first I tried it in bzflag itself, gave me the error in the title. Afterwards I tried it from the command line, gave me following:

Code: Select all

~/.bzf/worlds$ bzfs -world ducati.bzw
ERROR: Unable to start the server, perhaps one is already running?
Same with any other variation, without map, etc.
I'm pretty sure that no other server is running on my computer, checked with htop and killed any possible processes.
Any ideas?

Running on Ubuntu Mate 18.04, installed bzflag from repository.

Code: Select all

~/.bzf/worlds$ bzflag -v
BZFlag client 2.4.12.20171104-MAINT-linux-gnu-SDL (protocol 0221) http://BZFlag.org/
Copyright (c) 1993-2017 Tim Riker

Cheers

Re: Starting server - Failed (exit = 2)

Posted: Mon Oct 21, 2019 10:40 am
by blast
If you use the packages from Debian and Debian-based distros, I believe it runs a server automatically via systemd (and possibly via older init scripts if you're not using systemd). You'll want to either disable the systemd unit or make use if it to run the server.

Re: Starting server - Failed (exit = 2)

Posted: Tue Oct 22, 2019 8:23 pm
by trpted
While I agree with the post above mine, be sure to check what is listening on port 5154 - even if it is not BZFS.

https://vitux.com/find-out-which-port-n ... ing-linux/

https://www.cyberciti.biz/faq/unix-linu ... e-command/

Re: Starting server - Failed (exit = 2)

Posted: Tue Nov 26, 2019 9:51 am
by Knox
Ah, gotcha! Thanks blast and trpted!

systemctl showed me that bzflag.service is enabled and netstat got me the port!

Is there a way to interact with this service via config file or something? Right now I wouldn't know how to set a map on that server running...

Cheers

Re: Starting server - Failed (exit = 2)

Posted: Tue Nov 26, 2019 11:11 am
by blast
I think there's a file in /etc/default for that, maybe called 'bzflag-server'. It would have some variable you could populate with configuration options.

Re: Starting server - Failed (exit = 2)

Posted: Wed Nov 27, 2019 11:47 am
by Knox
Ah, yes, for the old sysV init system. The .service file for systemctl is located for me at /lib/systemd/system.

Code: Select all

● bzflag.service - BZFlag game server
   Loaded: loaded (/lib/systemd/system/bzflag.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-11-27 10:43:32 CET; 2h 0min ago
     Docs: man:bzfs(6)
 Main PID: 1073 (bzfs)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bzflag.service
           └─1073 /usr/games/bzfs -advertise NONE
From there on I can manipulate the bzflag.service file and change map etc. Thanks for the help!

Cheers

Re: Starting server - Failed (exit = 2)

Posted: Thu Nov 28, 2019 4:15 am
by blast
Ah, okay, didn't realize it wasn't used for systemd. I rarely use the packaged versions of BZFlag.