Ad Widget

Collapse

DM Master is missing events, triggers, and hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • steev
    Member
    • Aug 2010
    • 38

    #1

    DM Master is missing events, triggers, and hosts

    My master server is dumping out the following message when it tries to sync certain hosts from my slave node to the master:

    [Z3005] Query failed: [1062] Duplicate entry '0-' for key 'items_1' [insert into items (itemid,status,error) values (200200000055975,3,'ZBX_NOTSUPPORTED');

    As a result I have a slave that functions but the master has no records for lots and lots of hosts, templates, items and triggers. I don't get info in the 'top 20 issues' list, I can't put these hosts in maps and graphing is just plain weird.

    Is there a procedure to dump out each item, host, trigger, etc and re-import them manually into the master's database? Is there any kind of 'resync' within zabbix for DM data?
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    steev,

    What database are you using? What OS?

    I have heard in another thread that there might be problems with using an Oracle backend.

    Comment

    • steev
      Member
      • Aug 2010
      • 38

      #3
      oh, Mysql InnoDB and zab 1.8.3

      Comment

      • untergeek
        Senior Member
        Zabbix Certified Specialist
        • Jun 2009
        • 512

        #4
        Hmm. Well, hopefully someone else will have something to add.

        We're planning on going DM when it's safe for Oracle.

        Comment

        • steev
          Member
          • Aug 2010
          • 38

          #5
          thanks...

          I just noticed that I'm getting a bunch of deadlocks on my slave node.

          Anybody got a fix for deadlocks?

          Comment

          • untergeek
            Senior Member
            Zabbix Certified Specialist
            • Jun 2009
            • 512

            #6
            Um…

            Don't have an application try to write to the same row/table simultaneously?

            I'm not sure what's to blame here, but that's what a deadlock is.

            Comment

            • steev
              Member
              • Aug 2010
              • 38

              #7
              The application, unfortunately, seems to be zabbix.

              All I was doing is adding some templates to a host.

              Comment

              • qix
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2006
                • 423

                #8
                Both DM nodes have their own Database to talk to, right?
                With kind regards,

                Raymond

                Comment

                • untergeek
                  Senior Member
                  Zabbix Certified Specialist
                  • Jun 2009
                  • 512

                  #9
                  Indeed. That's a valid question. I don't mean to imply that your setup was not done properly, but it does sound suspiciously like a database collision, or a node-number collision.

                  Comment

                  • steev
                    Member
                    • Aug 2010
                    • 38

                    #10
                    yep, I have 2 DBs, 1 each on my master and slave server. Each zab server connects to the the mysql socket on localhost.

                    I seems like sync only sends 'parts' of what it should be sending back to the master during the sync. I configure templates on the slave and look at the template on the master (which should be the same, right) and the master's copy of the template is missing more than half the checks that the slave has.

                    I look in the log and I see lots of errors related to duplicate entries in the items table on the master. It's difficult to tell whether this is a symptom or the cause of my problems.

                    Ideally, I'd like to take zabbix offline, dump my hosts, items and triggers data from the slave, purge them from the master and then re-import into the master DB. Then, hopefully the syncs would start working again. Would that work?

                    Comment

                    • untergeek
                      Senior Member
                      Zabbix Certified Specialist
                      • Jun 2009
                      • 512

                      #11
                      Hmmm. Was it the parent or child node which was having deadlocks?

                      Comment

                      • steev
                        Member
                        • Aug 2010
                        • 38

                        #12
                        it was the child. At the time, I was going host by host (on the child), removing linked templates, saving the host, re-adding the same templates and then saving again in an attempt to 'trick' zabbix into resyncing the items back to the parent node.

                        It helped a little bit but it's still not right on the master. Is there any documented procedure to dump info from the child and import manually into the parent? What's the fix for missing DM data?

                        Comment

                        • steev
                          Member
                          • Aug 2010
                          • 38

                          #13
                          Mysql weirdness continues

                          Why does this happen? The sql I'm trying to run is from the zabbix log, happens right after it attempts to sync.

                          mysql> insert into items (itemid,units) values (200200000053522,'unixtime');
                          ERROR 1062 (23000): Duplicate entry '0-' for key 'items_1'

                          mysql> select * from items where itemid=200200000053522;
                          Empty set (0.00 sec)

                          Comment

                          • qix
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Oct 2006
                            • 423

                            #14
                            I did some DM experiments with 1.4.x. I found that it wasn't quite stable and I decided not to go for DM. It surprises me that now with 1.8.3 there still seem to be major bugs in DM.
                            With kind regards,

                            Raymond

                            Comment

                            • qix
                              Senior Member
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Oct 2006
                              • 423

                              #15
                              Are you doing anything with MySQL replication or the like?
                              With kind regards,

                              Raymond

                              Comment

                              Working...