Ad Widget

Collapse

Bigint out of range

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndreyHammer
    Member
    • Nov 2007
    • 57

    #1

    Bigint out of range

    Periodically there is this problem:

    26153:20080507:013221 Query::insert into history_uint (clock,itemid,value) values (1210098741,24831,18446744073709551615)
    26153:20080507:013221 Query failed:PGRES_FATAL_ERROR:ERROR: bigint out of range

    26153:20080507:013221 Query::select num,value_min,value_avg,value_max from trends where itemid=24831 and clock=1210096800
    26153:20080507:013221 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

    26099:20080507:013221 One child process died. Exiting ...
    26099:20080507:013223 ZABBIX Server stopped


    How to solve this problem?
  • vinny
    Senior Member
    • Jan 2008
    • 145

    #2
    hi,
    in ur table history_uint of the zabbix db, the field "value" is of type bigint.

    in ur logs, i see that ur db is postgres.
    For postgres, bigint data type is a signed 8-byte integer, up to 18 digits in length.

    ur zabbix tried to insert a 20 digit number

    so either u change ur column data type or u change the value/scale of the item that returned this value.

    vinny
    -------
    Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      All database schema related problems will be fixed.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • BrettClifford
        Junior Member
        • Sep 2008
        • 8

        #4
        I am a getting similar error here using zabbix_agentd 1.4.5 on OS X 10.5 with zabbix server 1.4.6 running on Solaris

        DB postgres 8.2

        Error
        =====
        Query::insert into history_uint (clock,itemid,value) values (1222217869,20509,18446744072664497548)
        21272:20080924:105749 Query failed:PGRES_FATAL_ERROR:ERROR: bigint out of range

        21272:20080924:105749 Query::select num,value_min,value_avg,value_max from trends where itemid=20509 and clock=1222214400
        21272:20080924:105749 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block
        21263:20080924:105749 One child process died. Exiting ...
        21263:20080924:105751 ZABBIX Server stopped


        I tracked this down to requesting vm.memory.size[total] "shared or free" also gets the problem

        when i do a ./zabbix_get -s"hostname" -p10050 -k"vm.memory.size[total]" from the server to the client i get back what looks like a sensible value
        1330369736

        As soon as i enable this item the error occurs.

        Any reason why the error causes the server to stop rather than just report the error in the logfile and continure processing.

        I have only just started looking at zabbix to monitor our server environment and may have missed something very obvious that can be set within the config file

        Thanks for any help

        Brett

        Comment

        • SMB
          Member
          • Sep 2007
          • 30

          #5
          This alter statement against your DB should fix the problem -

          ALTER TABLE history_uint ALTER "value" TYPE numeric;

          Comment

          • BrettClifford
            Junior Member
            • Sep 2008
            • 8

            #6
            As it turns out Mac OS X 10.5 agentd client was returning bad values for a vm.system.size[<variable] request.

            I tested this using zabbix_get command from the server and randomly the returned value was this very large 20 digit number for total memory.
            When it did return a resonable value things were ok even though the value was incorrect.
            vm.system.memory[total] returned 1.3G of memory for a server which has 2G installed
            Same strange results for [free] and [shared] requests.

            We checked the code and made it use sysctl

            Basically, the settings in config.h (generated by ./configure
            at the top level) mean that it was using the case
            #elif defined(HAVE_SYS_VMMETER_VMTOTAL)
            rather than the case
            #elif defined(HAVE_SYS_SYSCTL_H)

            Unfortunately, the code for the first of these neglects to
            check the result of the sysctl(2) call (and thus was not
            reporting that it had failed).

            Comment

            Working...