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

Zabbix Server PgSQL upgrade to 4.0.1 fails

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • None
    • 4.0.1
    • Server (S)

      Steps to reproduce:

      1. Trying to upgrade from 3.4.14
      (Reading database ... 56532 files and directories currently installed.)
      Preparing to unpack .../zabbix-server-pgsql_1%3a4.0.1-1+stretch_amd64.deb ...
      Unpacking zabbix-server-pgsql (1:4.0.1-1+stretch) over (1:3.4.14-1+stretch) ...
      Preparing to unpack .../libgpg-error-l10n_1.32-3~bpo9+2_all.deb ...
      Unpacking libgpg-error-l10n (1.32-3~bpo9+2) over (1.32-3~bpo9+1) ...
      Preparing to unpack .../libgpg-error0_1.32-3~bpo9+2_amd64.deb ...
      Unpacking libgpg-error0:amd64 (1.32-3~bpo9+2) over (1.32-3~bpo9+1) ...
      Setting up libgpg-error0:amd64 (1.32-3~bpo9+2) ...
      (Reading database ... 56532 files and directories currently installed.)
      Preparing to unpack .../zabbix-frontend-php_1%3a4.0.1-1+stretch_all.deb ...
      Unpacking zabbix-frontend-php (1:4.0.1-1+stretch) over (1:3.4.14-1+stretch) ...
      Preparing to unpack .../zabbix-get_1%3a4.0.1-1+stretch_amd64.deb ...
      Unpacking zabbix-get (1:4.0.1-1+stretch) over (1:3.4.14-1+stretch) ...
      Preparing to unpack .../zabbix-sender_1%3a4.0.1-1+stretch_amd64.deb ...
      Unpacking zabbix-sender (1:4.0.1-1+stretch) over (1:3.4.14-1+stretch) ...
      Setting up libgpg-error-l10n (1.32-3~bpo9+2) ...
      Setting up zabbix-server-pgsql (1:4.0.1-1+stretch) ...
      
      Configuration file '/etc/zabbix/zabbix_server.conf'
       ==> Modified (by you or by a script) since installation.
       ==> Package distributor has shipped an updated version.
       ==> Keeping old config file as default.
      [/usr/lib/tmpfiles.d/zabbix-server.conf:1] Line references path below legacy directory /var/run/, updating /var/run/zabbix → /run/zabbix; please update the tmpfiles.d/ drop-in file accordingly.
      Processing triggers for libc-bin (2.24-11+deb9u3) ...
      Setting up zabbix-frontend-php (1:4.0.1-1+stretch) ...
      Processing triggers for systemd (239-11~bpo9+1) ...
      Setting up zabbix-sender (1:4.0.1-1+stretch) ...
      Processing triggers for man-db (2.7.6.1-2) ...
      Setting up zabbix-get (1:4.0.1-1+stretch) ...
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      

      Result:
      The installation itself was fine. When starting the server, it fails to upgrade the DB:

      2018-11-01T11:30:50-06:00 zbxserver systemd[1]: Starting Zabbix Server...
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: Starting Zabbix Server. Zabbix 4.0.1 (revision 86073).
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: ****** Enabled features ******
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: SNMP monitoring:           YES
      2018-11-01T11:30:50-06:00 zbxserver systemd[1]: Started Zabbix Server.
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: IPMI monitoring:           YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: Web monitoring:            YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: VMware monitoring:         YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: SMTP authentication:       YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: Jabber notifications:      YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: Ez Texting notifications:  YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: ODBC:                      YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: SSH2 support:              YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: IPv6 support:              YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: TLS support:               YES
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: ******************************
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: using configuration file: /etc/zabbix/zabbix_server.conf
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: current database version (mandatory/optional): 03050116/03050116
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: required mandatory version: 04000000
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: starting automatic database upgrade
      2018-11-01T11:30:50-06:00 zbxserver postgres[21049]: [20-1] 2018-11-01 17:30:50.321 GMT [21049] zabbix@zabbix ERROR:  null value in column "acknowledged" violates not-null constraint
      2018-11-01T11:30:50-06:00 zbxserver postgres[21049]: [20-2] 2018-11-01 17:30:50.321 GMT [21049] zabbix@zabbix DETAIL:  Failing row contains (714, 0, 0, 22051, 1485309494, 392175048, 761, 1485352694, 355722226, null, 0, , null, 0).
      2018-11-01T11:30:50-06:00 zbxserver postgres[21049]: [20-3] 2018-11-01 17:30:50.321 GMT [21049] zabbix@zabbix STATEMENT:  update problem set acknowledged=(select acknowledged from events where events.eventid=problem.eventid)
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  null value in column "acknowledged" violates not-null constraint
      DETAIL:  Failing row contains (714, 0, 0, 22051, 1485309494, 392175048, 761, 1485352694, 355722226, null, 0, , null, 0).
       [update problem set acknowledged=(select acknowledged from events where events.eventid=problem.eventid)]
      2018-11-01T11:30:50-06:00 zbxserver zabbix_server[21047]: database upgrade failed
      2018-11-01T11:30:50-06:00 zbxserver systemd[1]: zabbix-server.service: Main process exited, code=exited, status=1/FAILURE
      2018-11-01T11:30:50-06:00 zbxserver systemd[1]: zabbix-server.service: Failed with result 'exit-code'.
      

            Unassigned Unassigned
            alexpr Alex P
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: