database conversion to master node faild

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Major
    • None
    • Affects Version/s: 2.2.1
    • Component/s: Server (S)
    • None
    • Environment:
      - Ubuntu 12.4 LTS
      - Zabbix 2.2.1 (Ubuntu package)

      Hello,

      we tried to convert the database to a server with NodeID 1 with the command: ./zabbix_server -n 1 -c /etc/zabbix/zabbix_server.conf
      (the NodeID before was 0). The NodeID in zabbix_server.conf is set to 1 and zabbix-server is stopped.

      In result of the command "./zabbix_server -n 1 -c /etc/zabbix/zabbix_server.conf" we got following error message:
      Dropping foreign keys ....................................................................................................................................... done.
      Converting tables ............................................................................................................ done.
      Creating foreign keys .................................................................................................................................zabbix_server [1958]: Error: [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`#sql-343_a6`, CONSTRAINT `c_sessions_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE) [ALTER TABLE `sessions` ADD CONSTRAINT `c_sessions_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE]
      ......Conversion failed.

      How we can fix this issue?

            Assignee:
            Unassigned
            Reporter:
            cochran
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: