Zmq conflicting ports with Zato 3


I am running several Zato instances on the same server. That worked OK with zato 2.0.x (needs manual configuration or ports). However, with Zato 3, I am getting ports conflicts for ZeroMQ.

Traceback (most recent call last):
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/lib/python2.7/site-packages/gunicorn/", line 495, in spawn_worker
    self.cfg.post_fork(self, worker)
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/zato-server/src/zato/server/base/parallel/", line 781, in post_fork
    ParallelServer.start_server(, arbiter.zato_deployment_key)
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/zato-server/src/zato/server/base/parallel/", line 491, in start_server
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/lib/python2.7/site-packages/gevent/", line 534, in run
    result = self._run(*self.args, **self.kwargs)
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/zato-common/src/zato/common/ipc/", line 62, in run
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/lib/python2.7/site-packages/gevent/", line 534, in run
    result = self._run(*self.args, **self.kwargs)
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/zato-common/src/zato/common/ipc/", line 28, in __init__
    super(Forwarder, self).__init__(base_address, pid)
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/zato-common/src/zato/common/ipc/", line 62, in __init__
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/lib/python2.7/site-packages/gevent/", line 534, in run
    result = self._run(*self.args, **self.kwargs)
  File "/opt/APPS/batches/tst/zato-batches/3.0/code/zato-common/src/zato/common/ipc/", line 36, in set_up_sockets
  File "zmq/backend/cython/socket.pyx", line 547, in zmq.backend.cython.socket.Socket.bind
  File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc
    raise ZMQError(errno)
ZMQError: Address already in use

However, in the config files I cannot find entries to configure ZMQ ports.

Regards, Jan

I tried to switch off zmq useage in server config with:


But these Address conflicts do not go away.

I see these files in /tmp:


It seems the two zato instance are writing to the same location.

Yes, the addresses are not TCP ones but IPC pipes used for communication between servers.

Alright, so the situation is that you have more than one cluster and servers have the same name within each cluster?

The problem is in zato-common/src/zato/common/ipc/

from tempfile import gettempdir

is being used, always resulting in /tmp

Yes, correct.
So I can solve it by using different names for the servers?

OK, I changed it to include cluster name, which must be always unique, in the name of the IPC socket, you can pull the updates:

@dsuch Well, that was fast :slight_smile:

Tx. for the quick solution!