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

Zabbix Proxy Upgrade from 2.2 to 2.4 failed

XMLWordPrintable

      Got an error after upgrading the proxy from 2.2 to 2.4:

      /var/log/zabbix/zabbix_proxy.log
      18213:20141225:010557.027 Duplicate data "" for field "name" is found in table "drules". Remove it manually and restart the process.
      18213:20141225:010557.027 database upgrade failed
      
      MySQL table on proxy
      mysql> select * from drules;
      +---------+--------------+------+------------------+-------+------------+--------+
      | druleid | proxy_hostid | name | iprange          | delay | nextcheck  | status |
      +---------+--------------+------+------------------+-------+------------+--------+
      |       3 |         NULL |      | 10.10.10.100-199 |  1800 | 1419466067 |      0 |
      |       4 |         NULL |      | 10.10.20.100-199 |  1800 | 1419466067 |      0 |
      |       5 |         NULL |      | 10.10.90.100-199 |  1800 | 1419466066 |      0 |
      |       6 |         NULL |      | 10.10.30.100-199 |  1800 | 1419466066 |      0 |
      +---------+--------------+------+------------------+-------+------------+--------+
      4 rows in set (0.00 sec)
      
      MySQL table on server
      mysql> select * from drules;
      +---------+--------------+-----------+------------------+-------+------------+--------+
      | druleid | proxy_hostid | name      | iprange          | delay | nextcheck  | status |
      +---------+--------------+-----------+------------------+-------+------------+--------+
      |       3 |        10105 | VLAN 1010 | 10.10.10.100-199 |  1800 | 1419472982 |      0 |
      |       4 |        10105 | VLAN 1020 | 10.10.20.100-199 |  1800 | 1419472982 |      0 |
      |       5 |        10105 | VLAN 1090 | 10.10.90.100-199 |  1800 | 1419472982 |      0 |
      |       6 |        10105 | VLAN 1030 | 10.10.30.100-199 |  1800 | 1419472982 |      0 |
      +---------+--------------+-----------+------------------+-------+------------+--------+
      

      It seems that the discovery rule names were not transferred from the server to the proxy. So I had to update them by hand:

      MySQL queries which fixed the errors
      mysql> update drules set name="VLAN 1010" where druleid=3;
      Query OK, 1 row affected (0.01 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
      
      mysql> update drules set name="VLAN 1020" where druleid=4;
      Query OK, 1 row affected (0.00 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
      
      mysql> update drules set name="VLAN 1090" where druleid=5;
      Query OK, 1 row affected (0.01 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
      
      mysql> update drules set name="VLAN 1060" where druleid=6;
      Query OK, 1 row affected (0.01 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
      

            Unassigned Unassigned
            dbarton Domi Barton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: