Ad Widget

Collapse

PGRES_FATAL_ERROR in zabbix server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • milprog
    Junior Member
    • Jul 2007
    • 27

    #1

    PGRES_FATAL_ERROR in zabbix server

    Hi all

    My zabbix server (1.4.2 on centos5-i386, postgresql version, postgresql 8.2.4 on centos4-x86_64) sometimes dies with these messages:

    Query::select new.itemid from items new, items dest where dest.itemid=10420 and new.key_=dest.key_ and new.hostid=10020
    Query failed:PGRES_FATAL_ERROR:FEHLER: NEW in einer Anfrage verwendet, die nicht Teil einer Regel ist
    (in english: NEW used in a query that is not part of a rule)

    (obviously the query uses new as aliasname, which causes a conflict with the predefined NEW variable).

    Is this a known problem? Perhaps the queries should be rewritten to avoid reserved names as aliases?

    In the source, I find this problem in two files:
    frontends/php/include/graphs.inc.php on line 209
    src/libs/zbxdbhigh/host.c on line 973

    I replaced the token 'new' by 'neww' in these two queries, then my problem disappeared (see the patch enclosed).

    I suggest that this small change be applied to the sources.

    btw: congrats to the wonderful error messages in the logs. These were descriptive enough to allow me to find the problem within a few minutes.

    ...meanwhile I filed this as a bug.

    Regards
    --Marcel
    Attached Files
    Last edited by milprog; 06-10-2007, 09:06. Reason: reported this issue as a bug
  • DigitalKid
    Junior Member
    • Nov 2007
    • 1

    #2
    I got the same problem.

    Thanx for patch!

    Comment

    • milprog
      Junior Member
      • Jul 2007
      • 27

      #3
      ...as Alexej mentioned in the bugtracker, this issue is already resolved in version 1.4.3 . I verfied this: Instead of applying my patch, I then installed the 1.4.2 SRPM, then I replaced the 1.4.2 tgz by the 1.4.3 tgz, adapted the SPEC file and could build 1.4.3 RPMs that also solve this problem.
      Regards
      --Marcel

      Comment

      Working...