Start problems

Services don’t start #

To get the reason for the rejection of a service’s task, click the small i next to a rejected task:

That opens a view showing the nature of the error:

The beauty of Docker Swarm and docker-compose.yml files is that they make it easier to create test environments locally. A great tip is to ensure a container boots locally or during CI to avoid a longer cycle of deploying to an online environment only to find out the container doesn’t run successfully.

There’s basically only two possible errors here:

Docker image problems #

  • No such image, as in the screenshot above - check the image name for typos
  • other image access problems
    • Check that your private registry is set up correctly.
    • If you’re using Docker Hub, you might have reached their image pull limit - in that case, either add a logged-in Docker Hub account as a registry in the Quantum Console, or mirror the image in question to your own registry.
quantum-cli always tries to pull all images before deploying the stack - and it will abort the deployment if it runs into problems like the ones above.

Exit Code: 1 or similar #

Whatever is running in the container is exiting at startup.

  • In many cases, it will still log some lines - check the task logs (small icon next to the rejected tasks), and also the service logs (click on the service name => then on “Service logs”).
  • often, this is due to fundamental configuration errors:
    • with images from Docker Hub and similar - missing environment variables, missing or wrong command options, etc.
    • with your own images - any of the above, plus faulty entrypoint scripts
quantum-cli with the --wait option will wait for all services to come up - that does not catch all startup errors (since services may start up and then exit unsuccessfully seconds later), but in many cases it can give a hint that something is going wrong.