Unable to start local multiplayer without internet connection

Bug #1830376 reported by Benedikt Straub
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
High
Unassigned

Bug Description

When no internet connection is present, trying to start a LAN multiplayer game is not possible because "Network is unreachable". An error message is shown and Widelands goes back to the main menu.
Playing on localhost only (e.g. AI-only games, loading a MP savegame) should be possible even if there is no network connection.

Related branches

Revision history for this message
Toni Förster (stonerl) wrote :

When exactly does this happen? After clicking "LAN/ Direct IP","host game", "joing game" or "start game"?

Revision history for this message
Benedikt Straub (nordfriese) wrote :

Immediately after clicking LAN/directIP in the main menu.

[LAN] Trying to open both sockets.
[LAN] Started an IPv4 socket on UDP port 7394.
[LAN] Started an IPv6 socket on UDP port 7394.
[LAN] Will broadcast for IPv6.
[LAN] Error when broadcasting on IPv6 socket to ff02::1, closing it: Network is unreachable.
[LAN] Closing an IPv6 socket.
[LAN] Closing an IPv4 socket.

Warning: Kunn de stedenwies Nett nich bruken!
Widelands kunn de stedenwies Nett nich bruken. Wahrschienelk bedrifft een annerer Prozess al eenen Server up Port 7394, 7395 oder 7396 oder diene Nett-Instellungen sünd kaputt.

Revision history for this message
Toni Förster (stonerl) wrote :

I'd say "diene Nett-Instellungen sünd kaputt" :)

If you're not connected to a network you should at least see this:

[LAN] Will broadcast to 127.0.0.1.

At least that is what happens on my machine. I wonder why it does not broadcast on IPv4 on your system? Have you disabled v4 on your system? What is the output when you're connected to a network?

Revision history for this message
Benedikt Straub (nordfriese) wrote :

I´m using IPv4 as far as I know. At least my IP address has four numbers in it…
Output when I´m connected to the internet:

[LAN] Started an IPv4 socket on UDP port 7394.
[LAN] Started an IPv6 socket on UDP port 7394.
[LAN] Will broadcast to 192.168.2.255.
[LAN] Will broadcast for IPv6.
[Host]: starting up.
[NetHost]: Opening a listening IPv4 socket on TCP port 7396
[NetHost]: Opening a listening IPv6 socket on TCP port 7396
[LAN] Started an IPv4 socket on UDP port 7395.
[LAN] Started an IPv6 socket on UDP port 7395.
[LAN] Will broadcast to 192.168.2.255.
[LAN] Will broadcast for IPv6.
Initializing economy serial
lastserial: 0

Instructions how to reproduce on Ubuntu 19.04:
– Disable WLAN (if present) and use a LAN cable. Check that you can open websites etc.
– Start Widelands. Multiplayer works correctly.
– Return to the main menu
– Pull out the LAN cable
– Try to start a MP game, and you get the output in #2
– Re-insert the LAN cable and check that you can open websites etc
– Multiplayer works correctly again

Revision history for this message
Toni Förster (stonerl) wrote :

Well technically speaking, you're connected to your local network that happens to be connected to the internet. I think this is a configuration problem. What happens if you disconnect your router from the internet but still have your computer connected to your router?

I assume you still broadcast to 192.168.2.255.

When you remove the Ethernet-Cable, are you still able to ping localhost?

Revision history for this message
GunChleoc (gunchleoc) wrote :

When I disable my WLAN connection, an already running local AI multiplayer game will still continue, but I can't enter the LAN lobby.

Changed in widelands:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Toni Förster (stonerl) wrote :

Cannot reproduce this on my mac. What OS are you using? Windows or Linux?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I'm on Linux Mint

Revision history for this message
Toni Förster (stonerl) wrote :

Okay, I tested this on Windows 10 and there it also doesn't happen.

So this is either a Linux problem. Or a problem of Ubuntu based distributions.

@kaputtnik can you test this with your Arch machine?

tags: added: linux
Revision history for this message
Toni Förster (stonerl) wrote :

I think I know what's going on. 127.0.0.1 is assigned to the loopback device lo. But it seems that widelands tries to use the LAN or Wi-Fi interface and ignores the loopback device on linux.

Revision history for this message
kaputtnik (franku) wrote :

On archlinux it's the same like it is on Ubuntu:

[LAN] Trying to open both sockets.
[LAN] Started an IPv4 socket on UDP port 7394.
[LAN] Started an IPv6 socket on UDP port 7394.
[LAN] Will broadcast for IPv6.
[LAN] Error when broadcasting on IPv6 socket to ff02::1, closing it: Network is unreachable

Isn't it normal that Lan games won't work (in the intentional meaning of playing with other people in a network) if there is no network connection established?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think it's OK like this for normal gameplay, but would be nice to have for local testing using multiplayer games.

GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.