Docker cms crash

Windows 10 Docker

This has happened on a daily basis now.

I will try to navigate to the CMS and the site doesn’t pull up.

I run docker-compose stop and it stops only the cms-db_1. When I run the Start it start cms-db and errors out on xmr and web. I then receive an error
ERROR: for cms-xmr Cannot start service cms-xmr: driver failed programming external connectivity on endpoint xibo-docker_cms-xmr_1 (422561284a0744853ae06458fb0cf96354a8d6bd955fe430f10f2034b924d2ea): Bind for 0.0.0.0:9505 failed: port is already allocated

I killed the ports before and ran the down up and stop start commands. It worked but did it again. What am I missing here?

This is the output for ps -a:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b7a322be400d xibosignage/xibo-cms:release-1.8.7 “/entrypoint.sh” 4 days ago Exited (137) 2 days ago xibo-docker_cms-web_1
6550a2f1d137 xibosignage/xibo-xmr:release-0.7 “/entrypoint.sh” 4 days ago Exited (255) 2 days ago xibo-docker_cms-xmr_1
093f79dbf833 mysql:5.6 “docker-entrypoint.sΓǪ” 4 days ago Up 24 seconds 3306/tcp xibo-docker_cms-db_1
dfd618f4538d xibosignage/xibo-cms:release-1.8.7 “/entrypoint.sh” 5 weeks ago Exited (137) 4 days ago xibodocker_cms-web_1
a90ae021e471 mysql:5.6 “docker-entrypoint.sΓǪ” 5 weeks ago Up 2 days 3306/tcp xibodocker_cms-db_1
872b4b9105ee xibosignage/xibo-xmr:release-0.7 “/entrypoint.sh” 5 weeks ago Up 2 days 0.0.0.0:9505->9505/tcp, 50001/tcp xibodocker_cms-xmr_1

Okay, for starters I can see that the system was once started with the service name xibo-docker and another time with the name xibodocker. By default I believe that docker-compose utilizes the name of the containing directory. Did you rename the directory at some point? If so, just know that doing so will have an adverse effect on the function of the commands and will require manual intervention.

Now to get things back online… Go ahead and remove all of the containers. If you aren’t running anything except for Xibo, then you can remove all stopped containers with this command:
docker container prune -f

Because your configurations and media are all stored in volumes, nothing should be lost by removing the containers. You should now be able to start everything from scratch, and any ports held by the stopped containers will have been released:
docker-compose up -d

My only concern here is that your containers exited in the first place, but I’m confident that this will get you back online.

Thanks for the response. I never did rename the directory. Not sure how that would’ve happened. I did do the prune and compose up and still received the error driver failed programming external connectivity on endpoint xibo-docker_cms-xmr_1: Bind for 0.0.0.0:9505 failed: port is already allocated.

I went ahead and killed the container with that port and it then ran docker-compose up -d. It appears to be working now. Hopefully will continue to work.