I’m having the same problem, except my issue is clearly a ports problem.
This is running a fresh VM within Proxmox, same OS, Product, also using docker for containerization of instances. Minecraft server crashes as follows:
01:33:22
Starting net.minecraft.server.Main
ServerMain/INFO01:33:27
Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
01:33:28
Loaded 1290 recipes
01:33:29
Loaded 1399 advancements
Server thread/INFO01:33:29
Starting minecraft server version 1.21.1
Loading properties
Default game type: SURVIVAL
Generating keypair
Starting Minecraft server on 192.168.15.248:25565
Using epoll channel type
Server thread/WARN01:33:29
**** FAILED TO BIND TO PORT!
The exception was: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
Perhaps a server is already running on that port?
Server thread/ERROR01:33:29
Encountered an unexpected exception
Console01:33:29
java.lang.IllegalStateException: Failed to initialize server
at net.minecraft.server.MinecraftServer.y(SourceFile:716) ~[server-1.21.1.jar:?]
at net.minecraft.server.MinecraftServer.a(SourceFile:281) ~[server-1.21.1.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Server thread/ERROR01:33:29
This crash report has been saved to: /AMP/Minecraft/crash-reports/crash-2024-08-30_08.33.29-server.txt
Server thread/INFO01:33:29
Stopping server
Saving worlds
Server thread/ERROR01:33:29
Exception stopping the server
Console01:33:29
java.lang.NullPointerException: Cannot invoke "aqu.C_()" because "$$5" is null
at net.minecraft.server.MinecraftServer.a(SourceFile:561) ~[server-1.21.1.jar:?]
at net.minecraft.server.MinecraftServer.v(SourceFile:620) ~[server-1.21.1.jar:?]
at apn.v(SourceFile:561) ~[server-1.21.1.jar:?]
at net.minecraft.server.MinecraftServer.y(SourceFile:735) ~[server-1.21.1.jar:?]
at net.minecraft.server.MinecraftServer.a(SourceFile:281) ~[server-1.21.1.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Is there potentially some issue with the docker image not binding ports to host properly? After the instance fails to start, I took a look at docker ps:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2d9546b57095 cubecoders/ampbase:java "/ampstart.sh +Core.…" 21 minutes ago Up 21 minutes AMP_minecraft0101
as well as ampinstmgr ports minecraft01:
[Info/1] AMP Instance Manager v2.5.1.6 built 16/08/2024 03:11
[Info/1] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[Info/1] Port usage for minecraft0101 (minecraft01)
[Info/1] Instance is currently running.
[Info/1] LISTENING 25565 TCP (Core.Webserver.Port)
[Info/1] LISTENING 2456 TCP (FileManagerPlugin.SFTP.SFTPPortNumber)
[Info/1] LISTENING 25565 Both (MinecraftModule.Minecraft.PortNumber)
and finally, lsof -i -P:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
AMP_Linux 32374 amp 5u IPv4 54884 0t0 UDP *:12820
AMP_Linux 32374 amp 11u IPv4 54886 0t0 TCP *:2223 (LISTEN)
AMP_Linux 32374 amp 15u IPv4 54899 0t0 TCP *:8080 (LISTEN)
AMP_Linux 47449 amp 5u IPv4 85564 0t0 UDP localhost:57699->localhost:12820
AMP_Linux 47449 amp 7u IPv4 87588 0t0 TCP garnet-games:2456 (LISTEN)
AMP_Linux 47449 amp 12u IPv4 90756 0t0 TCP garnet-games:25565 (LISTEN)
(garnet-games is the hostname of the server)
I set “Application Port Ranges” in Configuration > Instance Deployments > Networking as in this screenshot:
Basically just some ports for Minecraft, Terraria, source, Valheim, and some generic ports. I set all the default IP bindings for new instances to my local network interface as shown.
Hopefully this helps figure this out, excited to get started in AMP!