Enabling extra libraries


Each Zato installation contains a directory labeled zato_extra_paths the contents of which is automatically added to PYTHONPATH.

For instance, Zato binaries are installed into /opt/zato/3.0 so the zato command is in /opt/zato/3.0/bin/zato - hence the full path to zato_extra_paths is /opt/zato/3.0/zato_extra_paths.

This directory can be used to enable any libraries, dependencies or services themselves needed for a particular Zato installation.

Each Zato component needs to be stopped and started again for any changes made to zato_extra_paths be picked up


To enable support for the optional connectivity to IBM MQ queue managers:

  • Install PyMQI

  • Create symlinks from each PyMQI module to zato_extra_paths, e.g. assuming PyMQI has been installed to /usr/local/lib/python2.7/dist-packages and Zato binaries are in /opt/zato/3.0:

    $ ln -s /usr/local/lib/python2.7/dist-packages/pymqe.so /opt/zato/3.0/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/pymqi.py /opt/zato/3.0/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQC.py /opt/zato/3.0/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQCFC.py /opt/zato/3.0/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQXC.py /opt/zato/3.0/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQZC.py /opt/zato/3.0/zato_extra_paths
  • Enable IBM MQ messaging - for each server, open file server.conf and set component_enabled.ibm_mq to True. Restart all server afterwards.

  • (Optionally) If there is an

    ImportError: libmqic_r.so: wrong ELF class: ELFCLASS32

    error when starting a server, add an additional path to $LD_LIBRARY_PATH prior to starting it:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/lib64/

cx_Oracle and Oracle Database

To enable support for the Oracle Database:

  • Install the cx_Oracle client library using pip available in your Zato installation

    $ cd /opt/zato/current
    $ ./code/bin/pip install cx_Oracle
  • Install an Oracle DB client

  • Add a directory pointing to the Oracle DB client to LD_LIBRARY_PATH, e.g. by adding the following export command to the zato user’s ~/.bashrc. Below “/path/to/oracle/instantclient” is that directory where libclntsh.so can be found.

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/oracle/instantclient
  • Log out and log in as zato again

  • Restart all the servers that will be connecting to Oracle DB