1) Start server, and observer no errors
2) Start second server on same port
3) Duplicate port correctly detected
4) However when shutting down server prints NullPointerException
[11:33:10] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[11:33:10] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[11:33:10] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[11:33:10] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[11:33:10] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[11:33:10] [main/INFO]: Loaded 6 recipes
[11:33:10] [main/INFO]: Loaded 0 advancements
[11:33:10] [Server thread/INFO]: Starting minecraft server version 19w04b
[11:33:10] [Server thread/INFO]: Loading properties
[11:33:10] [Server thread/INFO]: Default game type: SURVIVAL
[11:33:10] [Server thread/INFO]: Generating keypair
[11:33:10] [Server thread/INFO]: Starting Minecraft server on *:25565
[11:33:10] [Server thread/INFO]: Using epoll channel type
[11:33:10] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[11:33:10] [Server thread/WARN]: The exception was: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
[11:33:10] [Server thread/WARN]: Perhaps a server is already running on that port?
[11:33:10] [Server thread/INFO]: Stopping server
[11:33:10] [Server thread/INFO]: Saving worlds
[11:33:10] [Server thread/ERROR]: Exception stopping the server
java.lang.NullPointerException: null
at net.minecraft.server.MinecraftServer.a(SourceFile:554) ~[minecraft_server.19w04b.jar:?]
at net.minecraft.server.MinecraftServer.h_(SourceFile:582) ~[minecraft_server.19w04b.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:688) [minecraft_server.19w04b.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Linked issues
Comments 1

Thank you for your report!
We're resolving and linking this ticket forward as a duplicate of MC-230525, as that ticket contains more detailed information and/or has already been triaged by Mojang.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.