monit stop harbor
command to stop Harbor, and it calls docker-compose down -v
to stop the Harbor containers. Sometimes the docker containers will not stop properly and end up in an exited state instead of being removed. This causes the docker-compose up -v command when monit start is executed to fail indefinitely.
Login to the Harbor tile VM using the bosh -d <Service_Instance_ID> ssh <Harbor-app_ID> command
Run sudo -i to get to root mode privileges.
Stop the Harbor service by running the following command:
monit stop harbor
NOTE: This will also stop the wavefront containers if it is enabled. Remember to run monit start wavefront when you start harbor at the end of this article
Issue the following commands to validate that there is a container stuck in an exiting or running state:
alias docker='/var/vcap/packages/docker/bin/docker -H unix:///var/vcap/sys/run/docker/dockerd.sock'
docker ps -a
If there are leftover containers seen in the docker ps -a output, preform the following step (if not proceed with step six):
docker stop $(docker ps -aq) && docker rm $(docker ps -aq)
You can start the Harbor service without issues. Also start wavefront if it is enabled on harbor.
monit start harbor
monit start wavefront