[ZBX-21487] Unable to add dependencies within Template Created: 2022 Aug 17  Updated: 2022 Aug 17  Resolved: 2022 Aug 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 6.0.7
Fix Version/s: None

Type: Patch request Priority: Trivial
Reporter: Arthur Ivanov Assignee: Zabbix Support Team
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2022-08-17-14-51-03-192.png     PNG File image-2022-08-17-14-51-32-964.png     PNG File image-2022-08-17-14-51-58-466.png    

 Description   

Steps to reproduce:

  1. Open "Linux by Zabbix agent active"
  2. Create new trigger "Version of Zabbix agent is outdated" which checks "last(/Linux by Zabbix agent active/agent.version)<>"{$MAINSTREAM_AGENT_VERSION}""
  3. Select depdendencies tab
  4. Add depend on "Zabbix agent is not available" trigger from same template
  5. Click "Update" template
  6. Got error "Cannot update trigger"

Result:

Undefined offset: 10443 [triggers.php:406 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->update() → CTriggerGeneral::updateDependencies() → CTriggerGeneral::inheritDependencies() in include/classes/api/services/CTriggerGeneral.php:3091]
Undefined offset: 10450 [triggers.php:406 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->update() → CTriggerGeneral::updateDependencies() → CTriggerGeneral::inheritDependencies() in include/classes/api/services/CTriggerGeneral.php:3091]
pg_query(): Query failed: ERROR: invalid input syntax for type bigint: ""
LINE 1: ...own FROM trigger_depends WHERE triggerid_down IN ('',26831,2...
^ [triggers.php:406 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->update() → CTriggerGeneral::updateDependencies() → CTriggerGeneral::inheritDependencies() → CTriggerGeneral::checkCircularDependencies() → DBselect() → pg_query() in include/db.inc.php:254]
Error in query [SELECT triggerdepid,triggerid_up,triggerid_down FROM trigger_depends WHERE triggerid_down IN ('',26831,26832,26833,26834,26835,26836,26837,26838,26839,26840,26841,26843,26844,31056,31097,31138,31308,31331,31354,31377,31600,31623,31646,31669)] [ERROR: invalid input syntax for type bigint: ""
LINE 1: ...own FROM trigger_depends WHERE triggerid_down IN ('',26831,2...
^]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [triggers.php:406 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->update() → CTriggerGeneral::updateDependencies() → CTriggerGeneral::inheritDependencies() → DB::insertBatch() → DB::addIds() → DB::reserveIds() → DBselect() → pg_query() in include/db.inc.php:254]
Error in query [SELECT nextid FROM ids WHERE table_name='trigger_depends' AND field_name='triggerdepid' FOR UPDATE] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [triggers.php:406 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->update() → CTriggerGeneral::updateDependencies() → CTriggerGeneral::inheritDependencies() → DB::insertBatch() → DB::addIds() → DB::reserveIds() → DBexecute() → pg_query() in include/db.inc.php:373]
Error in query [SELECT nextid FROM ids WHERE table_name='trigger_depends' AND field_name='triggerdepid' FOR UPDATE] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
Your database is not working properly. Please wait a few minutes and try to repeat this action. If the problem still persists, please contact system administrator. The problem might be caused by long running transaction or row level lock accomplished by your database management system.

Expected:

Dependencies should be created and saved.{}



 Comments   
Comment by Arthur Ivanov [ 2022 Aug 17 ]

If found out that template 'zabbix agent active' was not properly applied to my hosts, somehow part of triggers/items missing.  looks like some inconsistency by my site. 

Generated at Fri May 22 19:36:51 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.