Zato failing to start with using docker quickstart with Error ModuleNotFoundError: No module named 'redis._compat'


AS of today (haven’t checked since last Thursday) Zato is failing to start when the server fails with the following error - due to not being able to import redis._compat

2023-04-11 07:34:13,320 - INFO - 3192:MainThread - zato:0 - Skipping repo data path /opt/zato/env/qs-1/server1/work/kvdb/v10/zato.pubsub.metadata.json (zato.pubsub.metadata)
2023-04-11 07:34:13,649 - INFO - 3192:MainThread - zato.server.base.parallel:0 - Preferred address of server1@quickstart-312953 (pid: 3192) is
2023-04-11 07:34:14,451 - ERROR - 3192:MainThread - zato:0 - Exception in worker process → ("No module named 'redis._compat'",)
Traceback (most recent call last):
File “/opt/zato/3.2.0/code/zato-server/src/zato/server/ext/zunicorn/”, line 638, in spawn_worker
self.cfg.post_fork(self, worker)
File “/opt/zato/3.2.0/code/zato-server/src/zato/server/base/parallel/”, line 1590, in post_fork
ParallelServer.start_server(server, arbiter.zato_deployment_key)
File “/opt/zato/3.2.0/code/zato-server/src/zato/server/base/parallel/”, line 943, in start_server
locally_deployed = self._after_init_common(server) # type: ignore
File “/opt/zato/3.2.0/code/zato-server/src/zato/server/base/parallel/”, line 622, in _after_init_common
File “/opt/zato/3.2.0/code/zato-common/src/zato/common/kvdb/”, line 154, in init
self.conn_class = self._get_connection_class()
File “/opt/zato/3.2.0/code/zato-common/src/zato/common/kvdb/”, line 64, in _get_connection_class
from redis import StrictRedis
File “/opt/zato/3.2.0/code/lib/python3.8/site-packages/redis/”, line 4, in
from redis.client import Redis, StrictRedis
File “/opt/zato/3.2.0/code/lib/python3.8/site-packages/redis/”, line 16, in
from redis.connection import ConnectionPool, SSLConnection, UnixDomainSocketConnection
File “/opt/zato/3.2.0/code/lib/python3.8/site-packages/redis/”, line 19, in
from redis._compat import (b, xrange, imap, byte_to_chr, unicode, bytes, long,
ModuleNotFoundError: No module named ‘redis._compat’
2023-04-11 07:34:14,452 - INFO - 3192:MainThread - zato:0 - Worker exiting (pid: 3192)
2023-04-11 07:34:14,453 - INFO - 3192:MainThread - zato:0 - Closing IPC (/pubsub/pid)
2023-04-11 07:34:14,454 - INFO - 3192:MainThread - zato:0 - Closing IPC (/connector/config)
2023-04-11 07:34:14,454 - INFO - 3192:MainThread - zato.server.base.parallel:0 - Stopping server process (server1:3192) (3192)

Still digging to find more information.

It seems that _compat disappeared from redis-py some time back. only compat exists in the python redis package that is being loaded.

I can confirm that docker quickstart is now installing redis 4.5.4

Which does not have _compat, which is present in 3.3.11 of redis.

I found that run a shell in the container early enough (before the server starts) and pip install redis==3.3.11 zato starts fine.

docker exec -it su - zato -c “pip install redis==3.3.11”

Thank you for the message.

There is a new Docker Quickstart image available, please use it.



That worked, thanks