Page 1 of 1

2.6.0 cannot spawn a server

Posted: Sun May 26, 2019 5:01 am
by Alcamtar
I just installed Freeciv 2.6.0 on Arch (Manjaro) linux. I launched the GTK client and clicked Start New Game, but it wouldn't start. At the bottom of the window, the following four messages were displayed in sequence:
freeciv-gtk wrote:Starting local server
Couldn't connect to the server...
We probably couldn't start it from here
You'll have to start one manually. Sorry...


Every time I try Start New Game, the same four messages are displayed.

When launched the client from the command line got this:
bash wrote:$ freeciv-gtk
(freeciv-gtk3:27155): Gtk-WARNING **: 21:30:48.612: Theme parsing error: gtk.css:244:33: The :insensitive pseudo-class is deprecated. Use :disabled instead.
1: Failed to connect to spawned server!


With -d 3 I got this:
bash wrote:$ freeciv-gtk -d 3
(freeciv-gtk3:27403): Gtk-WARNING **: 21:37:46.607: Theme parsing error: gtk.css:244:33: The :insensitive pseudo-class is deprecated. Use :disabled instead.
3: Reading registry
3: Metaserver says latest 'stable' version is '2.6.0'; we have '2.6.0'
3: Arguments to spawned server: -p 5557 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
1: Failed to connect to spawned server!


Next I tried launching the server with the same command line:
bash wrote:$ freeciv-server -p 5557 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
This is the server for Freeciv version 2.6.0
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
0: bind failure: Address already in use (3 failed)
2: Host: 127.0.0.1, Port: 5557 (IPv4)

Not sure where to go from here. What else uses port 5557? I have no other freeciv running, this was a fresh install.

Re: 2.6.0 cannot spawn a server

Posted: Sun May 26, 2019 8:20 pm
by madmax
You may see what's running there with any of:
fuser 5557/tcp
lsof -i :5557
netstat -ltp

Have you tried manually launching the server on another port, and if that works, telling the client to connect to that one?

Re: 2.6.0 cannot spawn a server

Posted: Mon May 27, 2019 1:30 am
by Alcamtar
Thanks.

Here are the results:

bash wrote:$ sudo fuser 5557/tcp

$ sudo lsof -i :5557

$ sudo netstat -ltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:27060 0.0.0.0:* LISTEN 28542/steam
tcp 0 0 0.0.0.0:57621 0.0.0.0:* LISTEN 28097/spotify --for
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 622/sshd
tcp 0 0 localhost:ipps 0.0.0.0:* LISTEN 623/cupsd
tcp 0 0 0.0.0.0:27036 0.0.0.0:* LISTEN 28542/steam
tcp 0 0 localhost:57343 0.0.0.0:* LISTEN 28542/steam
tcp 0 0 0.0.0.0:35239 0.0.0.0:* LISTEN 28097/spotify --for
tcp6 0 0 [::]:ssh [::]:* LISTEN 622/sshd
tcp6 0 0 localhost:ipps [::]:* LISTEN 623/cupsd

$ freeciv-server -p 5556 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
This is the server for Freeciv version 2.6.0
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
0: bind failure: Address already in use (3 failed)
2: Host: 127.0.0.1, Port: 5556 (IPv4)

$ freeciv-server -p 5557 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
This is the server for Freeciv version 2.6.0
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
0: bind failure: Address already in use (3 failed)
2: Host: 127.0.0.1, Port: 5557 (IPv4)

$ freeciv-server -p 5558 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
This is the server for Freeciv version 2.6.0
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
0: bind failure: Address already in use (3 failed)
2: Host: 127.0.0.1, Port: 5558 (IPv4)

$ freeciv-server -p 5559 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
This is the server for Freeciv version 2.6.0
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
0: bind failure: Address already in use (3 failed)
2: Host: 127.0.0.1, Port: 5559 (IPv4)

$ freeciv-server -p 5560 --bind localhost -q 1 -e --saves ~/.freeciv/saves --scenarios ~/.freeciv/scenarios -A none
This is the server for Freeciv version 2.6.0
You can learn a lot about Freeciv at http://www.freeciv.org/
This freeciv-server program has player authentication support, but it's currently not in use.
0: bind failure: Address already in use (3 failed)
2: Host: 127.0.0.1, Port: 5560 (IPv4)


None of these ports appear to be in use. I have tried a fair number of other ports as well, all gives the same result.

Re: 2.6.0 cannot spawn a server

Posted: Sun Jun 02, 2019 6:47 pm
by madmax
Any of the three commands shows the port is not in use. And then no matter what port you pass to the server, it says it cannot bind to it because the address is in use. :?
I've installed Manjaro (18.0.4 XFCE edition, though the DE shouldn't matter) in a VM, updated the system, installed freeciv (2.6.0-3) and... it works. I've even tried monkey playing with firewall settings and I haven't managed to accidentally make it not work.

Re: 2.6.0 cannot spawn a server

Posted: Mon Jul 01, 2019 1:07 pm
by dimi
EDIT: I managed to fix this. There were double entries in /etc/hosts for localhost. Removing duplicates solves this to me.

I experience exactly the same problem, but I run Debian. Client cannot spawn a server, and if I try to run a server, with parameters client tries to use, I get

Code: Select all

3: Server attempting to listen on localhost:5557
0: bind failure: Address already in use (4 failed)
2: Host: ::1, Port: 5557 (IPv6)


But if I change --bind option from "localhost" to "127.0.0.1", or just remove it, server starts without a complain. May be something is broken with loopback interface.

How can I help to debug this?