Server fails to start during docker swarm deploy


I am trying to create a docker swarm install of Zato 3.2. Basically following these instructions but I am not using docker machine as I am have docker on a Fedora Linux machine.

I have created the docker-compose file using dockerize and ran
docker stack deploy -c docker-compose.yml zato
to deploy.

It looks like there is an error during the creation of the cluster:

zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Creating /opt/zato/env/qs-1/config/repo/logging.conf
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Creating /opt/zato/env/qs-1/config/repo/lua/internal/zato.rename_if_exists.lua
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Creating /opt/zato/env/qs-1/config/repo/service-sources.txt
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Creating /opt/zato/env/qs-1/config/repo/sql.conf
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Creating /opt/zato/env/qs-1/config/repo/static/email/sso-confirm.txt
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Creating /opt/zato/env/qs-1/config/repo/static/email/sso-welcome.txt
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Logging configuration stored in /opt/zato/env/qs-1/config/repo/logging.conf
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Could not create the server, e:Traceback (most recent call last): zato_zato_server.1.qg0r8rh2rtyx@simeonspc | File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/", line 758, in execute zato_zato_server.1.qg0r8rh2rtyx@simeonspc | fernet1 = Fernet(key1) zato_zato_server.1.qg0r8rh2rtyx@simeonspc | File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/cryptography/", line 35, in __init__ zato_zato_server.1.qg0r8rh2rtyx@simeonspc | key = base64.urlsafe_b64decode(key) zato_zato_server.1.qg0r8rh2rtyx@simeonspc | File "/usr/lib/python3.8/", line 133, in urlsafe_b64decode zato_zato_server.1.qg0r8rh2rtyx@simeonspc | return b64decode(s) zato_zato_server.1.qg0r8rh2rtyx@simeonspc | File "/usr/lib/python3.8/", line 87, in b64decode zato_zato_server.1.qg0r8rh2rtyx@simeonspc | return binascii.a2b_base64(s) zato_zato_server.1.qg0r8rh2rtyx@simeonspc | binascii.Error: Incorrect padding zato_zato_server.1.qg0r8rh2rtyx@simeonspc |
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | Successfully created a new server.
zato_zato_server.1.qg0r8rh2rtyx@simeonspc | You can now start it with the ‘zato start /opt/zato/env/qs-1’ command.

I have not included the preceding logs but could if needed.
Other parts of the stack seem to have deployed but the admin frontend shows that the load balancer cannot connect to a server.

Has anyone else seen this? Is perhaps the docker image out of date wrt to the github source?


Hello @simbloke,

thanks for the message - we are working on it and @anielkis will follow up soon.


I think it might be my fault. I had used random test data for the secret keys specified in the env file but I think they need to be in a certain format - not sure which.


Hello @simbloke ,

I deployed a Docker Swarm in a local Docker instance and I had no problems. Please, can you try again and confirm if it is working? If you need help, I will be waiting.


I tried again this morning and will show a full log of what I did. I am using a Fedora 33 machine.

$ docker --version
Docker version 20.10.6, build 370c289
$ dockerize --version
dockerize v0.14.0 go1.16.3
$ cat environment 

$ cd zato-build
$ git pull
Already up to date.
$ cd ..
$ dockerize -env environment -template ./zato-build/docker/swarm/docker-compose.yml.template:docker-compose.yml 

$ docker stack deploy -c docker-compose.yml zato
Creating network zato_backend
Creating network zato_default
Creating service zato_postgres
Creating service zato_redis
Creating service zato_zato_scheduler
Creating service zato_zato_bootstrap
Creating service zato_zato_server
Creating service zato_zato_webadmin
Creating service zato_zato_lb
Creating service zato_adminerzato

$ docker stack services  zato 
ID             NAME                  MODE         REPLICAS   IMAGE                                                      PORTS
s9axp1uibeov   zato_adminerzato      replicated   1/1        adminer:standalone                                         *:8081->8080/tcp
uuek39y7qj7w   zato_postgres         replicated   1/1        postgres:alpine                                            
gcrn05123pgh   zato_redis            replicated   1/1        redis:latest                                               
glg51dx3silt   zato_zato_bootstrap   replicated   1/1   
as2lngo4toaw   zato_zato_lb          replicated   1/1        traefik:1.7-alpine                                         *:8080->8080/tcp
n859o3mlzh5a   zato_zato_scheduler   replicated   1/1   
sq3h653q673c   zato_zato_server      replicated   2/2   *:30001->17010/tcp
vvehdm63ialz   zato_zato_webadmin    replicated   1/1   *:8183->8183/tcp

When I then login to the admin interface on the Clusters page I see the message " Could not fetch the load balancer’s configuration"

Many of the others screens do seem to load OK though I have alter or save anything on them.

Any help or advice would be much appreciated.
(On another machine I am going through the manual configuration route to try and gain a better understanding of how it all fits together)


Hello @simbloke ,
Good to know that it worked for you.
That screen display information of the classic Load Balancer used in Zato, but in cloud environments we use another approach to have a better integration with it, like using other Load Balancers. In this case, that message on the screen is OK.


Ah, ok thanks.
The manual install I did on a server also seems to be working so we’ll able to compare the two methods.