R
Runtipi4w ago
Jack

"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 error
36 Replies
Jack
JackOP4w ago
This happens no matter what port number I input on setup, including the default (25565)
MOUETTE03
MOUETTE034w ago
Hello, have you installed new applications that could correspond to the beginning of the trouble ?
Jack
JackOP4w ago
I don't think so - I haven't installed anything else between removing and attempting to reinstall the MC server
Jack
JackOP4w ago
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)
No description
MOUETTE03
MOUETTE034w ago
The network should no longer be there if the application has been uninstalled and you can no longer reinstall it
Jack
JackOP4w ago
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
Jack
JackOP4w ago
Nothing appears to be using port 25565
No description
Skullky
Skullky4w ago
ss -tlnp should show the ports already listening on your host, can you see it there ?
Jack
JackOP4w ago
A bunch of ports are listed, most of them qbittorrent, but none of them are 25565
MOUETTE03
MOUETTE034w ago
Docker or has the machine been restarted?
Jack
JackOP4w ago
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
MOUETTE03
MOUETTE034w ago
Try this order : docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" | grep 25565
Jack
JackOP4w ago
uh nothing showed up
MOUETTE03
MOUETTE034w ago
And this order : docker network inspect bridge
Jack
JackOP4w ago
here's what i get for that
No description
MOUETTE03
MOUETTE034w ago
This order : docker network inspect bridge -f '{{range $k,$v := .Containers}}{{$k}} -> {{$v.IPv4Address}} -> {{$v.Name}} -> {{$v.EndpointID}}{{"\n"}}{{end}}'
Jack
JackOP4w ago
Nothing shows up there either
MOUETTE03
MOUETTE034w ago
Does the "docker network ls" command always make a network for minecraft appear?
Jack
JackOP4w ago
No, one appears when I try to install but I am removing it before trying again. This is what that returns right now
No description
MOUETTE03
MOUETTE034w ago
This order : docker ps -a
Jack
JackOP4w ago
hmm now the minecraft container is showing up even though it's not running but it's not listed as using any ports
MOUETTE03
MOUETTE034w ago
This command shows all containers active, stop or out of order. Can you send capture
Jack
JackOP4w ago
sorry it's quite small, i have to zoom way out for the columns to fit
No description
MOUETTE03
MOUETTE034w ago
Ok this order : docker ps -a --filter "id=21f074e6eef6" --format "table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Ports}}"
Jack
JackOP4w ago
It's there but it's not assigned a port, looks like
No description
MOUETTE03
MOUETTE034w ago
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
Jack
JackOP4w ago
Trying a reinstall now well I got the same "already allocated" error again. hm
MOUETTE03
MOUETTE034w ago
Really strange! By changing the port to the installation invitation same result ?
Jack
JackOP4w ago
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
MOUETTE03
MOUETTE034w ago
I have no other idea at the moment, I hope someone else can help you
Jack
JackOP4w ago
thanks for your help!!
MOUETTE03
MOUETTE034w ago
Just a last question, didn't you use a user configuration on the previous installation ?
Jack
JackOP4w ago
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
MOUETTE03
MOUETTE034w ago
Maybe check if there is no configuration file left in the folder runtipi/user-config/migrated/ minecraft ?
Jack
JackOP4w ago
That worked!! I didn't even know that folder was there. thank you!
MOUETTE03
MOUETTE034w ago
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.

Did you find this page helpful?