Ad Widget

Collapse

No sync between nodes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ammer
    Junior Member
    • Dec 2013
    • 14

    #1

    No sync between nodes

    Hi,

    I am trying to setup a distributed monitoring system on Zabbix.
    But there is no communication between the nodes.
    I forwarded port 10051 on both sides but there is no data showing over the port.
    When i add the public IP:10051 in a browser, it shows OK.

    I edited the zabbix_server.conf on both systems and gave them a nodeID with 1 being the master and 2 being the slave.

    When converting the database on the master node i did run into an error but the frontend does show all the node options now.
    I am afraid of running the conversion again since i don't want to corrupt the database.
    Error:
    Code:
    root@zabbix-server:/# zabbix_server -n 1 -c /etc/zabbix/zabbix_server.conf
    zabbix_server: /usr/lib/i386-linux-gnu/libmysqlclient.so.18: no version information available (required by zabbix_server)
    Dropping foreign keys ....................................................................................................................................... done.
    Converting tables ............................................................................................................ done.
    Creating foreign keys .................................................................................................................................zabbix_server [19062]: Error: [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`#sql-3c3_dbb5`, 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.
    I saw a few similar post and i also got the following info from the MySQL database, I did notice the masterid says NULL instead of 0, but since its on both systems im not sure if this is a problem.

    Master node:
    Code:
    mysql> select*from nodes;
    +--------+---------------+--------------+-------+----------+----------+
    | nodeid | name          | ip           | port  | nodetype | masterid |
    +--------+---------------+--------------+-------+----------+----------+
    |      1 | Zabbix Server | 127.0.0.1    | 10051 |        1 |     NULL |
    |      2 | Ammer Thuis   | **.***.*.*** | 10051 |        0 |        1 |
    +--------+---------------+--------------+-------+----------+----------+
    2 rows in set (0.00 sec)
    Child node:
    Code:
    mysql> select*from nodes;
    +--------+---------------+--------------+-------+----------+----------+
    | nodeid | name          | ip           | port  | nodetype | masterid |
    +--------+---------------+--------------+-------+----------+----------+
    |      1 | Zabbix Server | **.***.**.** | 10051 |        2 |     NULL |
    |      2 | Ammer Thuis   | 127.0.0.1    | 10051 |        1 |        1 |
    +--------+---------------+--------------+-------+----------+----------+
    2 rows in set (0.30 sec)
    I also noted in the server log it didnt say what Node ID it was watching, just the following:
    Code:
     11043:20131225:152528.421 server #18 started [node watcher #1]
    anybody got a brilliant idea of what i am doing wrong?
    Last edited by Ammer; 25-12-2013, 19:03.
  • Ammer
    Junior Member
    • Dec 2013
    • 14

    #2
    Update

    Update:
    I was trying some modifications on hosts on both servers while watching the log file.
    When i deleted two host groups on the master server that should be on the child node, the following error showed up in the server log:
    Code:
     24909:20131225:185000.799 [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`hosts_groups`, CONSTRAINT `c_hosts_groups_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`) ON DELETE CASCADE) [insert into hosts_groups (hostgroupid,hostid,groupid) values (200200000000113,200200000010107,200200000000008);
    insert into hosts_templates (hosttemplateid,hostid,templateid) values (200200000000045,200200000010107,200200000010104);
    insert into items_applications (itemappid,applicationid,itemid) values (200200000005881,200200000000461,200200000023666);
    insert into items_applications (itemappid,applicationid,itemid) values (200200000005882,200200000000461,200200000023667);
    insert into items_applications (itemappid,applicationid,itemid) values (200200000005883,200200000000461,200200000023668);
    It looks a bit like the error i received when converting the database.

    So is there a way to redo the database conversion without corrupting the database??

    Comment

    • Ammer
      Junior Member
      • Dec 2013
      • 14

      #3
      Seriously nobody??

      Can anyone tell me how to fix the database conversion?

      Comment

      • Erravandrhel
        Junior Member
        • Dec 2015
        • 14

        #4
        I think u cant do it. Next time u should make backup before doing this kind of thing.

        Comment

        Working...