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

application.create API call sometimes result -32500 Application error. SQL statement execution has failed

XMLWordPrintable

    • Icon: Patch request Patch request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 5.0.13, 5.0.14
    • API (A), Frontend (F)
    • RHEL 8.4
      Linux qdev 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Mon Jun 14 17:25:42 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

      JSON string:
      {{{}}
      {{ "auth": "565975d59d1bceb0b2662da348aae8a2",}}
      {{ "id": "1",}}
      {{ "params": [}}
      {{ {}}
      {{ "hostid": "10424",}}
      {{ "name": "icinga1.doffynet.hu host: DB-stats1e-a"}}
      {{ },}}
      {{ {}}
      {{ "name": "icinga1.doffynet.hu host: DB-stats2e-a",}}
      {{ "hostid": "10424"}}
      {{ }}}
      {{ ],}}
      {{ "jsonrpc": "2.0",}}
      {{ "method": "application.create"}}
      }

      API error message:

      code: -32500 Application error. SQL statement execution has failed "INSERTINTO applications (hostid,name,applicationid) VALUES ('10424','icinga1.doffynet.hu host: DB-stats1e-a','1979'),('icinga1.doffynet.hu host: DB-stats2e-a','10424','1980')"

      PostgreSQL error message:

      2021-07-13 15:27:10.701 CEST [106655] ERROR: invalid input syntax for type bigint: "icinga1.doffynet.hu host: DB-stats2e-a" at character 120
      2021-07-13 15:27:10.701 CEST [106655] STATEMENT: INSERT INTO applications (hostid,name,applicationid) VALUES ('10424','icinga1.doffynet.hu host: DB-stats1e-a','1979'),('icinga1.doffynet.hu host: DB-stats2e-a','10424','1980')

      Seems sometimes SQL command created with wrong filed order (typed in red).

       

            zabbix.dev Zabbix Development Team
            doffy Dósa István
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: