pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.28k stars 1.56k forks source link

Server crashed on Ubuntu LXC #4673

Open catzy007 opened 2 years ago

catzy007 commented 2 years ago

Link to crashdump: https://crash.pmmp.io/view/5678393

Additional comments (optional)

I'm currently trying to run PMMP inside Proxmox LXC using Ubuntu 20.04 with curl -sL https://get.pmmp.io | bash -s - but didn't work. Then i'm using docker container but get

[06:45:00.798] [Server thread/CRITICAL]: RuntimeException: "RakLib failed to start: RuntimeException: "Failed to create socket: Address family not supported by protocol" in pmsrc/vendor/pocketmine/raklib/src/generic/Socket on line 60" (EXCEPTION) in "pmsrc/src/network/mcpe/raklib/RakLibServer" at line 140
--- Stack trace ---
  #0 (): pocketmine\network\mcpe\raklib\RakLibServer->pocketmine\network\mcpe\raklib\{closure}()
  #1 pmsrc/src/network/mcpe/raklib/RakLibServer(142): Threaded->synchronized(object Closure#24619)
  #2 pmsrc/src/network/mcpe/raklib/RakLibInterface(126): pocketmine\network\mcpe\raklib\RakLibServer->startAndWait()
  #3 pmsrc/src/network/Network(101): pocketmine\network\mcpe\raklib\RakLibInterface->start()
  #4 pmsrc/src/Server(1147): pocketmine\network\Network->registerInterface(object pocketmine\network\mcpe\raklib\RakLibInterface#23458)
  #5 pmsrc/src/Server(1177): pocketmine\Server->startupPrepareConnectableNetworkInterfaces(string[2] ::, integer 19133, true, true)
  #6 pmsrc/src/Server(1011): pocketmine\Server->startupPrepareNetworkInterfaces()
  #7 pmsrc/src/PocketMine(303): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[6] /data/, string[9] /plugins/)
  #8 pmsrc/src/PocketMine(326): pocketmine\server()
  #9 pmsrc(11): require(string[56] phar:///pocketmine/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---
[06:45:00.817] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[06:45:00.868] [Server thread/EMERGENCY]: Please upload the "/data/crashdumps/Fri_Dec_24-06.45.00-UTC_2021.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
[06:45:00.804] [RakLib thread/CRITICAL]: RuntimeException: "Failed to create socket: Address family not supported by protocol" (EXCEPTION) in "pmsrc/vendor/pocketmine/raklib/src/generic/Socket" at line 60
--- Stack trace ---
  #0 pmsrc/src/network/mcpe/raklib/RakLibServer(154): raklib\generic\Socket->__construct(object raklib\utils\InternetAddress#7)
  #1 pmsrc/src/thread/CommonThreadPartsTrait(93): pocketmine\network\mcpe\raklib\RakLibServer->onRun()
  #2 (): pocketmine\thread\Thread->run()
--- End of exception information ---
[06:45:03.692] [Server thread/EMERGENCY]: The crash dump has been automatically submitted to the Crash Archive. You can view it on https://crash.pmmp.io/view/5678369 or use the ID #5678369.
[06:45:03.693] [Server thread/EMERGENCY]: Forcing server shutdown

Is this behavior to be expected? I also try to run via baremetal (on other system) using docker and works well.

dktapps commented 2 years ago

I have no idea what would cause this. The correct arguments are being passed, unless your PHP binary doesn't support IPv6 then I don't understand the problem.

dktapps commented 2 years ago

You can try setting enable-ipv6=off in server.properties as a workaround.

catzy007 commented 2 years ago

The workaround you provided works absolutely fine.

Thank you.

dktapps commented 2 years ago

Please leave this open until it can be investigated properly.