"Port is already allocated" trying to install app
Hey folks,
I was hosting a Minecraft server through Tipi with no problems for several months. A couple days ago it started refusing connections, so I restarted my whole server to see if that helped. It didn't, so I uninstalled the Minecraft server and now I can't reinstall it, always due to this error:
error > Failed to install app minecraft-server:migrated: Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint minecraft-server_migrated-minecraft-server-1 (24fb54a369200ecbf9351bd3f4a5691cd9656f604f7f80dee5deef952796311a): Bind for 0.0.0.0:50805 failed: port is already allocated
Google turned up some directions about removing the network through Docker, which I tried, but I'm still getting the same error36 Replies
This happens no matter what port number I input on setup, including the default (25565)
Hello, have you installed new applications that could correspond to the beginning of the trouble ?
I don't think so - I haven't installed anything else between removing and attempting to reinstall the MC server
This is what I get with
docker network ls
so it seems it's at least creating the network (I'm using docker network rm
before each install attempt)
The network should no longer be there if the application has been uninstalled and you can no longer reinstall it
So when I ran "container ls" it still showed up-- I stopped it, removed it, tried to reinstall through Tipi and got the same error again
Bind for 0.0.0.0:25565 failed: port is already allocated
Nothing appears to be using port 25565

ss -tlnp
should show the ports already listening on your host, can you see it there ?A bunch of ports are listed, most of them qbittorrent, but none of them are 25565
Docker or has the machine been restarted?
I restarted the machine earlier today, restarting docker now
Docker restarted using systemctl, now starting tipi back up
Tried installing again and got the same "already allocated" error
Try this order :
docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" | grep 25565
uh nothing showed up
And this order : docker network inspect bridge
here's what i get for that

This order :
docker network inspect bridge -f '{{range $k,$v := .Containers}}{{$k}} -> {{$v.IPv4Address}} -> {{$v.Name}} -> {{$v.EndpointID}}{{"\n"}}{{end}}'
Nothing shows up there either
Does the "docker network ls" command always make a network for minecraft appear?
No, one appears when I try to install but I am removing it before trying again. This is what that returns right now

This order : docker ps -a
hmm now the minecraft container is showing up even though it's not running
but it's not listed as using any ports
This command shows all containers active, stop or out of order. Can you send capture
sorry it's quite small, i have to zoom way out for the columns to fit

Ok this order : docker ps -a --filter "id=21f074e6eef6" --format "table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Ports}}"
It's there but it's not assigned a port, looks like

Ok
1) try this command then "docker rm -f 21f074e6eef6"
To remove the minecraft container.
2) Restarted then dock and try to reinstall minecraft.
If it doesn't work I don't see another solution we'll have to wait for the help of specialists
Trying a reinstall now
well I got the same "already allocated" error again. hm
Really strange! By changing the port to the installation invitation same result ?
Yeah it doesn't seem to matter what port number I type on install it always says it's already in use
I may try rebooting the whole machine again but I have some other stuff not in containers that makes doing that annoying
I have no other idea at the moment, I hope someone else can help you
thanks for your help!!
Just a last question, didn't you use a user configuration on the previous installation ?
I think I had tried editing the config file in tipi on the original install when it had started always timing out, because I was trying to see if the port # was the issue
Maybe check if there is no configuration file left in the folder runtipi/user-config/migrated/ minecraft ?
That worked!! I didn't even know that folder was there. thank you!
Cool glad this solved your problem! Yes the folder saves the user configuration. And they stay in it has advantages and disadvantages when we forget them.