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

container zabbix/zabbix-server-pgsql 5.0.2 does not connect to database

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 5.0.2
    • Appliance (L), Packages (C)
    • None

      5.0.1 works:

      docker run --name z50srv -e DB_SERVER_HOST="10.133.112.87" -e DB_SERVER_PORT="7412" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="z50" -p 15051:10051 -d zabbix/zabbix-server-pgsql:centos-5.0.1 

      It shows:

      # docker logs z50srv | tail -7
      psql: FATAL:  database "zabbix" does not exist
         179:20200804:130957.535 server #18 started [poller #5]
         180:20200804:130957.536 server #19 started [unreachable poller #1]
         186:20200804:130957.543 server #25 started [icmp pinger #1]
         188:20200804:130957.544 server #27 started [alerter #1]
         189:20200804:130957.544 server #28 started [alerter #2]
         187:20200804:130957.545 server #26 started [alert manager #1]
         193:20200804:130957.620 server #32 started [preprocessing worker #2]

      remove container:

      docker stop z50srv && docker rm z50srv 

      Start 5.0.2:

      docker run --name z50srv -e DB_SERVER_HOST="10.133.112.87" -e DB_SERVER_PORT="7412" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="z50" -p 15051:10051 -d zabbix/zabbix-server-pgsql:centos-5.0.2
      

      It shows:

      # docker logs z50srv
      ** Preparing Zabbix server
      ** Using POSTGRES_USER variable from ENV
      ** Using POSTGRES_PASSWORD variable from ENV
      ********************
      * DB_SERVER_HOST: 10.133.112.87
      * DB_SERVER_PORT: 7412
      * DB_SERVER_DBNAME: z50
      * DB_SERVER_SCHEMA: public
      ********************
      **** PostgreSQL server is not available. Waiting 5 seconds...
      **** PostgreSQL server is not available. Waiting 5 seconds... 
      **** PostgreSQL server is not available. Waiting 5 seconds... 
      **** PostgreSQL server is not available. Waiting 5 seconds... 

       

            zabbix.dev Zabbix Development Team
            aigars.kadikis Aigars Kadikis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: