Starting server - Failed (exit = 2)

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
User avatar
Knox
Private First Class
Private First Class
Posts: 158
Joined: Tue Jun 12, 2007 12:40 pm

Starting server - Failed (exit = 2)

Post 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
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Starting server - Failed (exit = 2)

Post 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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
trpted
Private First Class
Private First Class
Posts: 242
Joined: Mon Feb 21, 2005 8:29 pm

Re: Starting server - Failed (exit = 2)

Post 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/
User avatar
Knox
Private First Class
Private First Class
Posts: 158
Joined: Tue Jun 12, 2007 12:40 pm

Re: Starting server - Failed (exit = 2)

Post 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
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Starting server - Failed (exit = 2)

Post 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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
Knox
Private First Class
Private First Class
Posts: 158
Joined: Tue Jun 12, 2007 12:40 pm

Re: Starting server - Failed (exit = 2)

Post 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
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Starting server - Failed (exit = 2)

Post by blast »

Ah, okay, didn't realize it wasn't used for systemd. I rarely use the packaged versions of BZFlag.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply