Ports already allocated

Hi,

I had a lazylibrarian container setup through portainer and was working well. I installed another version (thraxis) and stupidly forgot to allocate different ports. When I installed the conflicting version both containers (old and thraxis) disappeared from the container list, and I can’t find them anywhere.

I assumed that I’d broken it and have attempted a reinstall. I reinstalled the original version via linux and the container appears in portainer (hooray!), however during the deployment I get the following error in linux:

fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Error starting container b9f6002c736d4fdb1f0e85506a4c1c1eeb4a43d99f5aa8c7fd1f78d321dde2fa: 500 Server Error: Internal Server Error (\"driver failed programming external connectivity on endpoint lazylibrarian (db9e364069382ec348f5ddfaef25f71dc3afe4e33aeb5357f7ef0fd96a39ee49): Bind for 127.0.0.1:5299 failed: port is already allocated\")"}
    to retry, use: --limit @/opt/communityapps/apps/lazylibrarian.retry

I can see from the error message that the port is already allocated (I assume to the previously existing containers). How do I free the port up? Also, is there another section within portainer where I might find the two broken/conflicting containers so that I can remove them?

Massive thanks in advance to anyone who’s able to help, I’m totally stuck!
Timmeh!

It sounds like you have the old containers in a stopped state on your machine thus the port is still used… docker ps -a from the command line should confirm this. It also sounds like you may not be seeing them in Portainer due to a bug that has recently been patched. Try opening Portainer in an incognito tab to confirm this.

Thanks for you reply.
I’ve tried this already and sadly the container is not listed. However it is still running somewhere and blocking other apps from using ports.
Which directories should I be looking in to find and rm the local files to prevent it from running?