Server fails to start during docker swarm deploy

Hi,

I am trying to create a docker swarm install of Zato 3.2. Basically following these instructions https://zato.io/docs/admin/guide/install/swarm.html 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/create_server.py", 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/fernet.py", 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/base64.py", 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/base64.py", 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?

Regards,
Simeon

Hello @simbloke,

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

Regards.

Hi,
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.

Regards,
Simeon

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.

Redards,

Hello,
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 
ZATO_WEB_ADMIN_PASSWORD=bojIfHbsiCE
IDE_PUBLISHER_PASSWORD=ufSoll0l74795fL2wXtFyvuElPiQ0FJb
ZATO_ADMIN_INVOKE_PASSWORD=cfe573cf5bd4e05f
CLUSTER_NAME=bangor
SECRET_KEY=5ojUfASgCVmQDvV9vk5cWUU6xVd1K3fZPYvBjJ6kjw4=
JWT_SECRET_KEY=/Y+kOEM6ZxvGUSrXx1SqAJhw0dyXRCLOEXefUvuQBW4=
ODB_PASSWORD=d29e208ecb1de373
VERBOSE=y

$ 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        registry.gitlab.com/zatosource/docker-registry/cloud:3.2   
as2lngo4toaw   zato_zato_lb          replicated   1/1        traefik:1.7-alpine                                         *:8080->8080/tcp
n859o3mlzh5a   zato_zato_scheduler   replicated   1/1        registry.gitlab.com/zatosource/docker-registry/cloud:3.2   
sq3h653q673c   zato_zato_server      replicated   2/2        registry.gitlab.com/zatosource/docker-registry/cloud:3.2   *:30001->17010/tcp
vvehdm63ialz   zato_zato_webadmin    replicated   1/1        registry.gitlab.com/zatosource/docker-registry/cloud:3.2   *: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)

Regards,
Simeon

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.

regards,

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.

Regards,
Simeon