Ad Widget

Collapse

Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key value violates unique constraint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hubertf
    Junior Member
    • Jun 2007
    • 5

    #1

    Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key value violates unique constraint

    Once a week, zabbix is crashing with the problem :

    Query::insert into trends (clock,itemid,num,value_min,value_avg,value_max) values (1228338000,19223,1,1.000000,1.000000,1.000000)
    23501:20081203:220023 Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key value violates unique constraint "trends_pkey"

    23501:20081203:220023 Query::update items set nextcheck=1228338143,prevvalue=lastvalue,lastvalue ='1.000000',lastclock=1228338023 where itemid=19223
    23501:20081203:220023 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

    23501:20081203:220023 Query::select distinct function,parameter,itemid,lastvalue from functions where itemid=19223
    23501:20081203:220023 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

    23474:20081203:220024 One child process died. Exiting ...


    I've tried to cleans trends for itemid 19223, but the problem is still here...
    I'm using postgresql 8.3.5 and zabbix 1.6.1

    Another question why zabbix is crashing when there's an SQL error, I think the excpetion should be try/catched and an alert mail should be sent! because now, i've a monitoring program that monitor zabbix (a monitor for the monitor)!!!
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    I agree, this should be fixed. It probably happens due to local time changes (ntpd?) on your ZABBIX system.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • hubertf
      Junior Member
      • Jun 2007
      • 5

      #3
      Originally posted by Alexei
      I agree, this should be fixed. It probably happens due to local time changes (ntpd?) on your ZABBIX system.
      Ntpd is not running on my system...

      Comment

      Working...