[raiguard] [2.0.14] IPv6 binding fails when using bind address ::

kryptonian98
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Nov 07, 2024 5:20 am
Contact:

[raiguard] [2.0.14] IPv6 binding fails when using bind address ::

Post by kryptonian98 »

When using

Code: Select all

 --bind ::
the game crashes? I don't think it should crash as that's perfectly valid bind address to use in most apps. Otherwise the game doesn't appear to bind on IPv6.

Server logs:

Code: Select all

   0.000 2024-11-07 05:19:02; Factorio 2.0.14 (build 79988, linux64, headless, space-age)
   0.000 Operating system: Linux
   0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "31497" "--server-settings" "/factorio/configs/server-settings.json" "--server-banlist" "/factorio/configs/server-banlist.json" "--rcon-port" "27015" "--server-whitelist" "/factorio/configs/server-whitelist.json" "--use-server-whitelist" "--server-adminlist" "/factorio/configs/server-adminlist.json" "--rcon-password" <private> "--server-id" "/factorio/config/server-id.json" "--mod-directory" "/factorio/mods" "--bind" "::" "--start-server-load-latest" 
   0.000 Config path: /opt/factorio/config/config.ini
   0.000 Read data path: /opt/factorio/data
   0.000 Write data path: /factorio [10108/10176MB]
   0.000 Binaries path: /opt/factorio/bin
   0.019 System info: [CPU: Intel(R) N100, 4 cores, RAM: 31858 MB]
   0.019 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.020 Running in headless mode
   0.020 Audio is disabled
   0.021 Info ModManager.cpp:434: FeatureFlag expansion-shaders = true
   0.021 Info ModManager.cpp:434: FeatureFlag freezing = true
   0.021 Info ModManager.cpp:434: FeatureFlag quality = true
   0.021 Info ModManager.cpp:434: FeatureFlag rail-bridges = true
   0.021 Info ModManager.cpp:434: FeatureFlag segmented-units = true
   0.021 Info ModManager.cpp:434: FeatureFlag space-travel = true
   0.021 Info ModManager.cpp:434: FeatureFlag spoiling = true
   0.023 Loading mod settings squeak-through-2 0.1.2 (settings.lua)
   0.025 Loading mod core 0.0.0 (data.lua)
   0.040 Loading mod base 2.0.14 (data.lua)
   0.190 Loading mod elevated-rails 2.0.14 (data.lua)
   0.213 Loading mod flib 0.15.0 (data.lua)
   0.223 Loading mod quality 2.0.14 (data.lua)
   0.235 Loading mod factoryplanner 2.0.4 (data.lua)
   0.244 Loading mod space-age 2.0.14 (data.lua)
   0.462 Loading mod base 2.0.14 (data-updates.lua)
   0.479 Loading mod quality 2.0.14 (data-updates.lua)
   0.503 Loading mod space-age 2.0.14 (data-updates.lua)
   0.520 Loading mod squeak-through-2 0.1.2 (data-final-fixes.lua)
   0.653 Checksum for core: 3504056361
   0.653 Checksum of base: 48730768
   0.653 Checksum of squeak-through-2: 1101572755
   0.653 Checksum of elevated-rails: 971617432
   0.653 Checksum of flib: 2235140407
   0.653 Checksum of quality: 3898255384
   0.653 Checksum of factoryplanner: 2719536303
   0.653 Checksum of space-age: 1545753807
   1.086 Prototype list checksum: 673132184
   1.157 Info PlayerData.cpp:66: Local player-data.json available, timestamp 1730956738
   1.157 Info PlayerData.cpp:73: Cloud player-data.json unavailable
   1.159 Factorio initialised
   1.188 Info ServerSynchronizer.cpp:20: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   1.188 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(Ready) to(PreparedToHostGame)
   1.188 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(PreparedToHostGame) to(CreatingGame)
   1.188 Loading map /factorio/saves/default-save.zip: 3620724 bytes.
   1.205 Loading level.dat: 7336726 bytes.
   1.209 Info Scenario.cpp:178: Map version 2.0.14-2
   1.357 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
   1.357 Loading script.dat: 1154062 bytes.
   1.360 Checksum for script __level__/control.lua: 2463946943
   1.383 Checksum for script __factoryplanner__/control.lua: 4159932969
   1.433 Info UDPSocket.cpp:32: Opening socket at (IP ADDR:({[::]:31497}))
   1.434 Hosting game at IP ADDR:({[::]:31497})
   1.434 Info HttpSharedState.cpp:55: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6
   1.655 Info AuthServerConnector.cpp:108: Obtained serverPadlock for serverHash (xQ871RpwHJPCdDPJcVVhNAKCuJ8TNztm) from the auth server.
   1.655 Info ServerMultiplayerManager.cpp:803: updateTick(396175) changing state from(CreatingGame) to(InGame)
   1.670 Info ServerRouter.cpp:664: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197, pingpong3.factorio.com:34197, pingpong4.factorio.com:34197) for own address
   1.670 Error CommandLineMultiplayer.cpp:355: Hosting multiplayer game failed: Sendto (IP ADDR:({45.79.173.216:34197})) failed (9: Bad file descriptor)
   1.698 Info ServerMultiplayerManager.cpp:119: Disconnecting multiplayer connection.
   1.698 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(InGame) to(DisconnectingScheduled)
   1.717 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
   1.717 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(DisconnectingScheduled) to(Closed)
   1.835 Info UDPSocket.cpp:233: Closing socket
   1.835 Info UDPSocket.cpp:263: Socket closed
   1.839 Goodbye
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 632
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] [2.0.14] IPv6 binding fails when using bind address ::

Post by raiguard »

The issue is that when you bind to an IPv6 address, the IPv4 socket is never opened, so making requests to IPv4 addresses won't work.
Don't forget, you're here forever.
kryptonian98
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Nov 07, 2024 5:20 am
Contact:

Re: [raiguard] [2.0.14] IPv6 binding fails when using bind address ::

Post by kryptonian98 »

raiguard wrote: Thu Dec 05, 2024 9:21 pm The issue is that when you bind to an IPv6 address, the IPv4 socket is never opened, so making requests to IPv4 addresses won't work.
In that case, how should I be able to bind to both or is that not supported at all?
It does seem that the pingbong servers are IPv4-only, but due to the nature of it, that's not really surprising.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 632
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] [2.0.14] IPv6 binding fails when using bind address ::

Post by raiguard »

I am working on a fix.
Don't forget, you're here forever.
Post Reply

Return to “Assigned”