Get the App
SLTechnology News&Howtos  ›  Servers  › 

How does docker swarm view error messages that service cannot start

Shulou Source: shulou.com Published: 2022-06-01 02:50:50 11月18日 Update

This article is about how docker swarm looks for error messages that service cannot start. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

When you run the docker stack deploy-c xxxxx.yml stack_name command, you will sometimes encounter some services that cannot start the container properly. You can view the information by using the following command:

Docker service ps-- no-trunc {serviceName}

After executing the command, you will see an error message similar to the following:

[root@manager crs2sc] # docker service ps shd_cfg2-- no-trunc

ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS

Q878gbecak71uujkotzojak15 shd_cfg2.1 mongo:latest@sha256:472a6b9bc30cc086cdda92eb25f0ae0f78afccb4ae6d50be6c05c9bb0ac2ca14 worker1 Running Running 38 seconds ago

Xizbvq4h7kyl1eelomfzjg6bk\ _ shd_cfg2.1 mongo:latest@sha256:472a6b9bc30cc086cdda92eb25f0ae0f78afccb4ae6d50be6c05c9bb0ac2ca14 worker1 Shutdown Rejected 5 minutes ago "No such image: mongo:latest@sha256:472a6b9bc30cc086cdda92eb25f0ae0f78afccb4ae6d50be6c05c9bb0ac2ca14"

Z86jb8nbyamag0rvd5dhv8tbi\ _ shd_cfg2.1 mongo:latest@sha256:472a6b9bc30cc086cdda92eb25f0ae0f78afccb4ae6d50be6c05c9bb0ac2ca14 worker1 Shutdown Rejected 6 minutes ago "No such image: mongo:latest@sha256:472a6b9bc30cc086cdda92eb25f0ae0f78afccb4ae6d50be6c05c9bb0ac2ca14"

From the information, you can see that there is a problem with the docker image. Re-pull the image will solve the problem.

Thank you for reading! This is the end of this article on "how to check the error message that service cannot start" on docker swarm. I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Information errors commands content more articles mirrors questions good practical containers articles look knowledge accessible reference help related services run Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker OPPO Reno vpn Microsoft