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

Auto registration as well as network discovery fails in 2.2.3RC1

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.2.3rc1
    • Fix Version/s: None
    • Component/s: Server (S)
    • Environment:
      server runs on Oracle Ent server, 2.6.18-371.4.1.0.1.el5, Redhat 5.10 with MySQL db 5.5.21 MySQL Community Server (GPL).

      Description

      When adding new server by auto registration, but also with network discovery, registering server fails.
      It is because of a bug in sql query, which prevents to finish the transaction, effectively rolling it back.
      Here is on which sql step registration fails:

      28236:20140306:155524.414 trapper #2 [processing data]
      28236:20140306:155524.414 trapper got '

      { "request":"active checks", "host":"TEST", "host_metadata":"Windows MTAPPWEBTEST 6.0.6002 Microsoft Windows Server 2008 Standard Edition Service Pack 2 x64"}

      '
      28236:20140306:155524.414 In send_list_of_active_checks_json()
      28236:20140306:155524.414 In get_hostid_by_host() host:'TEST'
      28236:20140306:155524.414 query [txnlev:0] [select hostid,status from hosts where host='TEST' and status in (0,1) and flags<>2 and proxy_hostid is null]
      28236:20140306:155524.415 query [txnlev:1] [begin;]
      28236:20140306:155524.415 query [txnlev:1] [select autoreg_hostid from autoreg_host where proxy_hostid is null and host='TEST']
      28236:20140306:155524.416 In DCget_nextid() table:'autoreg_host' num:1
      28236:20140306:155524.416 End of DCget_nextid() table:'autoreg_host' [26:26]
      28236:20140306:155524.416 query [txnlev:1] [insert into autoreg_host (autoreg_hostid,proxy_hostid,host,listen_ip,listen_dns,listen_port,host_metadata) values (26,null,'TEST','111.111.111.111','test',10050,'Windows TEST 6.0.6002 Microsoft Windows Server 2008 Standard Edition Service Pack 2 x64')]
      28236:20140306:155524.416 In process_events() events_num:1
      28236:20140306:155524.416 In DCget_nextid() table:'events' num:1
      28236:20140306:155524.416 End of DCget_nextid() table:'events' [2130844:2130844]
      28236:20140306:155524.416 query [txnlev:1] [insert into events (eventid,source,object,objectid,clock,ns,value) values (2130844,2,3,26,1394121324,0,1);
      ]
      28236:20140306:155524.417 In process_actions() events_num:1
      28236:20140306:155524.417 query [txnlev:1] [select actionid,evaltype from actions where status=0 and eventsource=2]
      28236:20140306:155524.417 In check_action_conditions() actionid:4
      28236:20140306:155524.417 query [txnlev:1] [select conditionid,conditiontype,operator,value from conditions where actionid=4 order by conditiontype]
      28236:20140306:155524.418 In check_action_condition() actionid:4 conditionid:25 cond.value:'Linux'
      28236:20140306:155524.418 In check_auto_registration_condition()
      28236:20140306:155524.418 query [txnlev:1] [select host_metadata from autoreg_host where autoreg_hostid=26]
      28236:20140306:155524.418 End of check_auto_registration_condition():FAIL
      28236:20140306:155524.418 End of check_action_condition():FAIL
      28236:20140306:155524.418 End of check_action_conditions():FAIL
      28236:20140306:155524.418 In check_action_conditions() actionid:6
      28236:20140306:155524.418 query [txnlev:1] [select conditionid,conditiontype,operator,value from conditions where actionid=6 order by conditiontype]
      28236:20140306:155524.418 In check_action_condition() actionid:6 conditionid:24 cond.value:'Windows'
      28236:20140306:155524.418 In check_auto_registration_condition()
      28236:20140306:155524.418 query [txnlev:1] [select host_metadata from autoreg_host where autoreg_hostid=26]
      28236:20140306:155524.418 End of check_auto_registration_condition():SUCCEED
      28236:20140306:155524.418 End of check_action_condition():SUCCEED
      28236:20140306:155524.418 End of check_action_conditions():SUCCEED
      28236:20140306:155524.418 In DCget_nextid() table:'escalations' num:1
      28236:20140306:155524.418 End of DCget_nextid() table:'escalations' [2:2]
      28236:20140306:155524.418 In execute_operations() actionid:6
      28236:20140306:155524.418 query [txnlev:1] [select o.operationtype,g.groupid,t.templateid from operations o left join opgroup g on g.operationid=o.operationid left join optemplate t on t.operationid=o.operationid where o.actionid=6]
      28236:20140306:155524.419 In op_host_add()
      28236:20140306:155524.419 In add_discovered_host() eventid:2130844
      28236:20140306:155524.419 query [txnlev:1] [select proxy_hostid,host,listen_ip,listen_dns,listen_port from autoreg_host where autoreg_hostid=26]
      28236:20140306:155524.419 query [txnlev:1] [select null from hosts where host='TEST' and status=3]
      28236:20140306:155524.419 query [txnlev:1] [select hostid,proxy_hostid from hosts where host='TEST' and flags<>2 and status in (0,1) order by hostid limit 1]
      28236:20140306:155524.419 In DBget_nextid() tablename:'hosts'
      28236:20140306:155524.419 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='hosts' and field_name='hostid']
      28236:20140306:155524.419 query [txnlev:1] [update ids set nextid=nextid+1 where nodeid=0 and table_name='hosts' and field_name='hostid']
      28236:20140306:155524.419 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='hosts' and field_name='hostid']
      28236:20140306:155524.419 End of DBget_nextid():10119 table:'hosts' recid:'hostid'
      28236:20140306:155524.419 query [txnlev:1] [insert into hosts (hostid,proxy_hostid,host,name) values (10119,null,'TEST','TEST')]
      28236:20140306:155524.420 In DBadd_interface()
      28236:20140306:155524.420 query [txnlev:1] [select interfaceid,useip,ip,dns,port,main from interface where hostid=10119 and type=1]
      28236:20140306:155524.420 In DBget_nextid() tablename:'interface'
      28236:20140306:155524.420 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='interface' and field_name='interfaceid']
      28236:20140306:155524.420 query [txnlev:1] [update ids set nextid=nextid+1 where nodeid=0 and table_name='interface' and field_name='interfaceid']
      28236:20140306:155524.420 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='interface' and field_name='interfaceid']
      28236:20140306:155524.420 End of DBget_nextid():28 table:'interface' recid:'interfaceid'
      28236:20140306:155524.420 query [txnlev:1] [insert into interface (interfaceid,hostid,main,type,useip,ip,dns,port) values (28,10119,1,1,1,'111.111.111.111','test',10050)]
      28236:20140306:155524.421 End of DBadd_interface():28
      28236:20140306:155524.421 In add_discovered_host_groups()
      28236:20140306:155524.421 query [txnlev:1] [select groupid from hosts_groups where hostid=10119 and groupid=5]
      28236:20140306:155524.421 In DBget_nextid() tablename:'hosts_groups'
      28236:20140306:155524.421 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='hosts_groups' and field_name='hostgroupid']
      28236:20140306:155524.421 query [txnlev:1] [update ids set nextid=nextid+1 where nodeid=0 and table_name='hosts_groups' and field_name='hostgroupid']
      28236:20140306:155524.421 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='hosts_groups' and field_name='hostgroupid']
      28236:20140306:155524.421 End of DBget_nextid():165 table:'hosts_groups' recid:'hostgroupid'
      28236:20140306:155524.421 query [txnlev:1] [insert into hosts_groups (hostgroupid,hostid,groupid) values (165,10119,5);
      ]
      28236:20140306:155524.422 End of add_discovered_host_groups()
      28236:20140306:155524.422 End of add_discovered_host()
      28236:20140306:155524.422 End of op_host_add()
      28236:20140306:155524.422 In op_groups_add()
      28236:20140306:155524.422 In add_discovered_host() eventid:2130844
      28236:20140306:155524.422 query [txnlev:1] [select proxy_hostid,host,listen_ip,listen_dns,listen_port from autoreg_host where autoreg_hostid=26]
      28236:20140306:155524.422 query [txnlev:1] [select null from hosts where host='TEST' and status=3]
      28236:20140306:155524.422 query [txnlev:1] [select hostid,proxy_hostid from hosts where host='TEST' and flags<>2 and status in (0,1) order by hostid limit 1]
      28236:20140306:155524.422 In DBadd_interface()
      28236:20140306:155524.422 query [txnlev:1] [select interfaceid,useip,ip,dns,port,main from interface where hostid=10119 and type=1]
      28236:20140306:155524.422 In substitute_simple_macros() data:'10050'
      28236:20140306:155524.422 End of DBadd_interface():28
      28236:20140306:155524.422 End of add_discovered_host()
      28236:20140306:155524.422 In add_discovered_host_groups()
      28236:20140306:155524.422 query [txnlev:1] [select groupid from hosts_groups where hostid=10119 and groupid=10]
      28236:20140306:155524.422 In DBget_nextid() tablename:'hosts_groups'
      28236:20140306:155524.422 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='hosts_groups' and field_name='hostgroupid']
      28236:20140306:155524.422 query [txnlev:1] [update ids set nextid=nextid+1 where nodeid=0 and table_name='hosts_groups' and field_name='hostgroupid']
      28236:20140306:155524.423 query [txnlev:1] [select nextid from ids where nodeid=0 and table_name='hosts_groups' and field_name='hostgroupid']
      28236:20140306:155524.423 End of DBget_nextid():166 table:'hosts_groups' recid:'hostgroupid'
      28236:20140306:155524.423 query [txnlev:1] [insert into hosts_groups (hostgroupid,hostid,groupid) values (166,10119,10);
      ]
      28236:20140306:155524.423 End of add_discovered_host_groups()
      28236:20140306:155524.423 End of op_groups_add()
      28236:20140306:155524.423 End of execute_operations()
      28236:20140306:155524.423 query [txnlev:1] [insert into escalations (escalationid,actionid,status,triggerid,itemid,eventid,r_eventid) values (2,6,0,null,null,2130844,null);
      ]
      28236:20140306:155524.423 End of process_actions()
      28236:20140306:155524.423 In its_flush_updates()
      28236:20140306:155524.423 In its_load_services_by_triggerids()

      28236:20140306:155524.423 query [txnlev:1] [select serviceid,triggerid,status,algorithm from services where]
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      28236:20140306:155524.423 [Z3005] query failed: [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [select serviceid,triggerid,status,algorithm from services where]
      28236:20140306:155524.423 query [select serviceid,triggerid,status,algorithm from services where] failed, setting transaction as failed
      28236:20140306:155524.423 End of its_load_services_by_triggerids()
      28236:20140306:155524.423 In DBget_nextid() tablename:'service_alarms'
      28236:20140306:155524.423 End of DBget_nextid() transaction failed
      28236:20140306:155524.423 In its_flush_updates():SUCCEED
      28236:20140306:155524.423 End of process_events()
      28236:20140306:155524.423 commit called on failed transaction, doing a rollback instead
      28236:20140306:155524.423 query [txnlev:1] [rollback;]
      28236:20140306:155524.424 End of get_hostid_by_host():FAIL
      28236:20140306:155524.424 cannot send list of active checks to [111.111.111.111]: host [TEST] not found
      28236:20140306:155524.424 send_list_of_active_checks_json() sending [

      { "response":"failed", "info":"host [TEST] not found"}

      ]

      Everything is fine until one particular query, which is not finished.
      If server is added manually, data then is received and loaded into db.
      But if not - no server can be added automatically.

      I have to use version 2.2.3RC1 because 2.2.2 shuts down itself (call ZBX-7860).

        Attachments

        1. screenshot-1.jpg
          screenshot-1.jpg
          98 kB
        2. screenshot-2.jpg
          screenshot-2.jpg
          46 kB
        3. screenshot-3.jpg
          screenshot-3.jpg
          40 kB
        4. screenshot-4.jpg
          screenshot-4.jpg
          58 kB
        5. screenshot-5.jpg
          screenshot-5.jpg
          63 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jaredj Jaroslaw Jozwik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: