I have 10 apps running on TrueNAS scale. Yesterday, 2 of them reported as crashed. An attempt to restart them had them sitting perennially at “Deploying”.
The app_lifecycle log reported both as unable to start due to the assigned port being already allocated. The specific error messages are below.
Error response from daemon: driver failed programming external connectivity on endpoint ix-mariadb-mariadb-1 (501f79fa7378c5e5ab6144e0da99935a9a205d1b8fc66f55d56882c380868cc7): Bind for 0.0.0.0:3306 failed: port is already allocated
Error response from daemon: driver failed programming external connectivity on endpoint ix-homepage-homepage-1 (01b95e4678d7b30294f24bcd9f1d3c7d2f35fd83f75d78e59d1070b778fef712): Bind for 0.0.0.0:30054 failed: port is already allocated
A reboot of the system produced the same outcome. 8 out of 10 apps came back up OK, but these two continued to report a port conflict.
I’ve incremented the assigned ports by one for each app and they are now starting up successfully.
The question I have is what changed? Both apps have been running on the ‘standard’ ports for some time. To the best of my knowledge, I have not made any other changes to the system or applied an upgrade.
I’d really like to understand why this has occurred.
Thanks for any thoughts you take the time to share.
After posting that restarting the problem apps with an incremented port number worked. I wondered what would happen if I reverted them to the original port numbers?
I edit both configs and both successfully started using the original port numbers that were previously being reported as already allocated.
It seems like some register of assigned ports was failing to release the allocations even across a reboot? But successfully running up the app on a different port did release the allocation?
Anyway, that seems to be the workaround for this error, assign a different port, start the app and then you can return to using the original port.
This may warrant posting an official bug report, look at the menu at the top.
The apps system should let go of used ports between reboots, but it kind of sounds like it didn’t manage to do that here.
I’ve had phantom docker containers running before, just had one a few weeks ago. The app in my case would run as it’s behind a reverse proxy, but, weird results happened. Took days to figure out I had another old container running with a slightly different name. Was not mine, I believe Scale somehow borked something. Once I docker stopped it, all was fine.
Instead of ix-nextcloud-nextcloud, container was nextcloud-nextcloud. Showed up that way after a reboot. Only time it has happened top me so not reproducible. It took me forever to simply type docker container ls!
Hey, so I’m getting this exact same problem. I had to restart my machine after making a small hardware change (installing a GPU). Since then I can’t get all of the apps back up and running, they always say the port isn’t available. I’ve tried switching the port numbers around to some success, but I’ve not been able to get all apps running back on their original port numbers. The issue persists across reboots which is really really strange.
I’m at a bit of a loss on what to do next, so if anyone has any ideas? I seems the docker service isn’t release the ports, but I have no idea how I can resolve that.