-
Incident report
-
Resolution: Fixed
-
Minor
-
2.0.0
-
Ubuntu 12.04 with PostgreSQL 9.1
When looking in the IT Services tab under Monitoring or Configuration I get an SQL error at the bottom of the page.
pg_query(): Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ...9999999 AND sl.servicedownid=s.serviceid ORDER BY s.sortorde...
^ [include/db.inc.php:430]
Error in query [SELECT DISTINCT sl.linkid,sl.servicedownid,sl.soft,sl.serviceupid FROM services_links sl,services s WHERE ( (sl.serviceupid IN ('2')) ) AND sl.linkid BETWEEN 000000000000000 AND 099999999999999 AND sl.servicedownid=s.serviceid ORDER BY s.sortorder, s.serviceid] [ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ...9999999 AND sl.servicedownid=s.serviceid ORDER BY s.sortorde...
^]
pg_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:565]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:566]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:430]
Error in query [SELECT DISTINCT s.* FROM services s,services_links slc WHERE s.serviceid=slc.serviceupid AND slc.soft=0 AND (slc.servicedownid IN ('2')) AND s.serviceid BETWEEN 000000000000000 AND 099999999999999] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
pg_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:565]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:566]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:430]
Error in query [SELECT t.triggerid,t.description FROM triggers t WHERE (t.triggerid IN ('0')) ] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
pg_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:565]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:566]
Switching Debug on, I was able to find the problem query,
SQL (0.00044): SELECT DISTINCT sl.linkid,sl.servicedownid,sl.soft,sl.serviceupid FROM services_links sl,services s WHERE ( (sl.serviceupid IN ('2')) ) AND sl.linkid BETWEEN 000000000000000 AND 099999999999999 AND sl.servicedownid=s.serviceid ORDER BY s.sortorder, s.serviceid
CAPIObject->get() > CAPIObject>__call() > czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService>get() > CService>addRelatedObjects() > CService>fetchChildDependencies() -> DBselect()
- duplicates
-
ZBX-5030 Frontend Configuration "IT Services" DB errors
- Closed