Ad Widget

Collapse

Auto-registration broken after upgrade from 3.0 to 3.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r00000000m
    Junior Member
    • Sep 2018
    • 2

    #1

    Auto-registration broken after upgrade from 3.0 to 3.4

    Hello !

    I recently upgraded from zabbix 3.0 to 3.4 (zabbix-proxy-pgsql: 1:3.4.13-1+stretch). And I broke hosts autoregistration.
    Before maybe reporting a bug issue I try here.

    zabbix-agent on the host that should be discovered is configured to talk with a zabbix proxy :
    Code:
    Server=zabbix-proxy
    ServerActive=zabbix-proxy
    Hostname=todiscover
    The proxy can communicate with the server :
    Code:
    Server=zabbix
    Hostname=zabbix-proxy
    Of course I tried debugging and I can see on the server the database INSERT without error log :
    Code:
    26116:20180908:153414.816 End of DBget_nextid():10770 table:'hosts' recid:'hostid'
     26116:20180908:153414.816 query [txnlev:1] [insert into hosts (hostid,proxy_hostid,host,name) values (10770,10584,'todiscover','todiscover');
    ]
     26116:20180908:153414.817 In DBadd_interface()
     26116:20180908:153414.817 query [txnlev:1] [select interfaceid[...]
    But the host is not available in the GUI.
    What's really strange is that if I enter the "insert into hosts" SQL command manually using psql... it's working : the host is then available in the GUI.

    Any idea about this ? The only strange thing I can notice in the logs is the "end of line" between the end of the "insert into hosts" SQL command and the trailing "]" charracter.
    Regards,
  • r00000000m
    Junior Member
    • Sep 2018
    • 2

    #2
    I started looking at the postgresql logs. It will take time I guess because I am not an SQL expert. What I can see is that the insert command is tried :

    Code:
    2018-09-09 12:35:45.387 CEST [12344] zabbix@zabbix DEBUG:  StartTransactionCommand
    2018-09-09 12:35:45.387 CEST [12344] zabbix@zabbix INSTRUCTION :  insert into hosts (hostid,proxy_hostid,host,name) values (10770,10584,'todiscover','todiscover');
    
    2018-09-09 12:35:45.387 CEST [12344] zabbix@zabbix LOG:  instruction : insert into hosts (hostid,proxy_hostid,host,name) values (10770,10584,'todiscover','todiscover');
    
    2018-09-09 12:35:45.387 CEST [12344] zabbix@zabbix DEBUG:  ProcessQuery
    2018-09-09 12:35:45.387 CEST [12344] zabbix@zabbix INSTRUCTION :  insert into hosts (hostid,proxy_hostid,host,name) values (10770,10584,'todiscover','todiscover');
    
    2018-09-09 12:35:45.388 CEST [12344] zabbix@zabbix DEBUG:  CommitTransactionCommand
    2018-09-09 12:35:45.388 CEST [12344] zabbix@zabbix INSTRUCTION :  insert into hosts (hostid,proxy_hostid,host,name) values (10770,10584,'todiscover','todiscover');
    
    2018-09-09 12:35:45.388 CEST [12344] zabbix@zabbix DEBUG:  StartTransactionCommand
    2018-09-09 12:35:45.388 CEST [12344] zabbix@zabbix INSTRUCTION :  select interfaceid,useip,ip,dns,port,main from interface where hostid=10770 and type=1
    2018-09-09 12:35:45.388 CEST [12344] zabbix@zabbix LOG:  instruction : select interfaceid,useip,ip,dns,port,main from interface where hostid=10770 and type=1
    The only error I can see so fat is this one, but it doesn't seems to be related... (translation from french : "syntax error at end of line at character number 143")
    Code:
    2018-09-09 12:35:45.486 CEST [12344] zabbix@zabbix DEBUG:  StartTransactionCommand
    2018-09-09 12:35:45.486 CEST [12344] zabbix@zabbix INSTRUCTION :  select t.triggerid,t.templateid from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=10770 and
    2018-09-09 12:35:45.486 CEST [12344] zabbix@zabbix ERREUR:  erreur de syntaxe à la fin de l'entrée au caractère 143
    2018-09-09 12:35:45.486 CEST [12344] zabbix@zabbix INSTRUCTION :  select t.triggerid,t.templateid from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=10770 and
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix DEBUG:  StartTransactionCommand
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix INSTRUCTION :  rollback;
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix LOG:  instruction : rollback;
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix DEBUG:  ProcessUtility
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix INSTRUCTION :  rollback;
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix DEBUG:  CommitTransactionCommand
    2018-09-09 12:35:45.488 CEST [12344] zabbix@zabbix INSTRUCTION :  rollback;

    Comment

    • DmitryL
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2016
      • 278

      #3

      Comment

      • buttler654
        Junior Member
        • Sep 2018
        • 1

        #4
        That is I am not the only one who is facing this same error.

        Comment

        Working...