Starting and stopping servers

Restart a Zato container and get the same environment back.

A Zato server runs inside a container, so starting and stopping a server means starting and stopping its container.

Stop, start and restart the container

Use the standard Docker commands with the container's name:

docker stop zato-4.1
docker start zato-4.1
docker restart zato-4.1

To follow the startup, watch the log until the environment reports that it is ready:

docker logs -f zato-4.1

The three inputs of a start

Every start builds the environment from scratch, from three inputs:

  • The environment variables that the container was created with - ports, passwords, database addresses, all of the environment variables reference
  • The mounted project directory - your project with its services, enmasse YAML and configuration - see the deployment tutorial
  • The external databases - the ODB and the audit log database, when they are MySQL, PostgreSQL or Oracle DB rather than the SQLite defaults

A container built from these three inputs comes back complete - it deploys the services from the mount and imports the enmasse YAML on startup.

Anything that existed only inside the container does not come back:

  • The SQLite ODB and SQLite audit log, if you left them at their defaults - configuration created only in the Dashboard and never exported, and audit events stored in SQLite, are not retained. Exporting the configuration to enmasse retains it, and an external audit log database retains the events.
  • Passwords that you did not set - a password that was auto-generated is generated again, so set your own through the environment variables if anything outside the container depends on them.
  • Log files, unless the logs directory is mounted - see logging
  • Log levels changed from the Dashboard, which revert to the Zato_Log_Level* variables
Keep the environment's definition outside the container. Keep the project in Git, the databases outside the container and the secrets in environment variables. Any container, restarted or recreated on any host, then comes back as the same environment. Configuration that exists only inside a running container does not survive a restart - to export and commit it, see the DevOps tutorial.

What to check afterwards

  1. The server answers - see ping endpoints:
curl http://localhost:17010/zato/ping
  1. The Dashboard loads and shows the environment you expect.
  2. Your services are deployed, under Services in the Dashboard.
  3. The scheduler is running, if this container is meant to run it - see multi-server environments.
  4. The log shows no errors from the last few minutes - see logging.

If alerting watches any of these, expect a burst of alerts during the restart itself - alerting measures connections that were down during the restart like any other failure.

See also

PageWhat it covers
Deployment tutorialThe project mount and the enmasse YAML that a starting container reads
BackupWhat to back up so any container can be recreated anywhere
LoggingFollowing server logs and shipping them off the box

Learn more