Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18007

Installation from containers need a correction

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 5.2 (plan)
    • 5.0.1
    • Documentation (D)
    • None
    • Team D
    • Sprint 66 (Jul 2020), Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)

      Example 2 on this page https://[www.zabbix.com/documentation/current/manual/installation/containers|http://www.zabbix.com/documentation/current/manual/installation/containers] does not provide correct deployment.

      Both zabbix-server-pgsql and zabbix-web-nginx-pgsql endlessly report

      **** PostgreSQL server is not available. Waiting 5 seconds...
      

      This is due to /usr/bin/docker-entrypoint.sh has following code to check connectivity to DB:

      psql "$ssl_opts" --host ${DB_SERVER_HOST} --port ${DB_SERVER_PORT} --username ${DB_SERVER_ROOT_USER} --list --quiet
      

      If dbname is not specified at the command line then psql uses user_name as dbname but DB zabbix does not exist, we created zabbix_dmp database instead. So this needs to be changed:

      --- POSTGRES_DB="zabbix_pwd"
      +++ POSTGRES_DB="zabbix"
      

      The second problem is with zabbix-web-nginx-pgsql container exposing wrong port, if we deploy this container as it is right now in documentation then ngnx is listening on port 8080, so this needs to be changed:

      --- -p 443:8443
      +++ -p <some_host_port>:8080
      

      Bottom line, these are steps to deploy working configuration (without snmp_trapper):

      docker run --name postgres-server -t -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="zabbix" --restart unless-stopped -d postgres:latest
      
      docker run --name zabbix-server-pgsql -t -e DB_SERVER_HOST="postgres" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="zabbix" --link postgres-server:postgres -p 11051:10051 --restart unless-stopped -d zabbix/zabbix-server-pgsql:latest
      
      docker run --name zabbix-web-nginx-pgsql -t -e DB_SERVER_HOST="postgres" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="zabbix" --link postgres-server:postgres --link zabbix-server-pgsql:zabbix-server -p 8080:8080 -v /etc/ssl/nginx:/etc/ssl/nginx:ro --restart unless-stopped -d zabbix/zabbix-web-nginx-pgsql:latest
      

       

            martins-v Martins Valkovskis
            BGmot Evgeny Yurchenko
            Team D
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: