Hi,
After upgrading the server from 4.2.1 to 4.4.0 I'm getting query error on Hosts page. I'm using postgresql database and Centos.
I also check with DB server but there is nothing found suspicious. My 2 other servers are upgraded well and not getting any error.
Also getting error when attaching template to the host.
Below are the query error on Hosts page,
Below are the error at the time of template attaching to host,
I need to solve for this ASAP as this is a production environment. Someone please help me here.
Thanks.
After upgrading the server from 4.2.1 to 4.4.0 I'm getting query error on Hosts page. I'm using postgresql database and Centos.
I also check with DB server but there is nothing found suspicious. My 2 other servers are upgraded well and not getting any error.
Also getting error when attaching template to the host.
Below are the query error on Hosts page,
- pg_query(): Query failed: ERROR: relation "item_rtdata" does not exist
- LINE 1: ...mid) AS rowscount,i.hostid FROM items i LEFT JOIN item_rtdat...
- ^ [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → CItem->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT DISTINCT COUNT(DISTINCT i.itemid) AS rowscount,i.hostid FROM items i LEFT JOIN item_rtdata ir ON ir.itemid=i.itemid WHERE i.type<>9 AND i.flags IN (0,4) AND i.hostid=11405 GROUP BY i.hostid] [ERROR: relation "item_rtdata" does not exist
- LINE 1: ...mid) AS rowscount,i.hostid FROM items i LEFT JOIN item_rtdat...
- ^]
- pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → CDiscoveryRule->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT DISTINCT COUNT(DISTINCT i.itemid) AS rowscount,i.hostid FROM items i LEFT JOIN item_rtdata ir ON ir.itemid=i.itemid WHERE i.flags=1 AND i.hostid=11405 GROUP BY i.hostid] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → CTrigger->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT DISTINCT COUNT(DISTINCT t.triggerid) AS rowscount,i.hostid FROM triggers t,functions f,items i WHERE i.hostid=11405 AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND t.flags IN (0,4) GROUP BY i.hostid] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → CGraph->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT DISTINCT COUNT(DISTINCT g.graphid) AS rowscount,i.hostid FROM graphs g,graphs_items gi,items i WHERE i.hostid=11405 AND gi.graphid=g.graphid AND i.itemid=gi.itemid AND g.flags IN (0,4) GROUP BY i.hostid] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → CHttpTest->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT COUNT(DISTINCT ht.httptestid) AS rowscount,ht.hostid FROM httptest ht WHERE ht.hostid=11405 GROUP BY ht.hostid] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → CApplication->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT COUNT(DISTINCT a.applicationid) AS rowscount,a.hostid FROM applications a WHERE a.hostid=11405 GROUP BY a.hostid] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostGeneral->addRelatedObjects() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT hosttagid,tag,value,hostid FROM host_tag WHERE hostid=11405] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CHostInterface->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT hi.* FROM interface hi WHERE hi.hostid=11405] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT hd.hostid,hd2.parent_itemid FROM host_discovery hd,host_discovery hd2 WHERE hd.hostid=11405 AND hd.parent_hostid=hd2.hostid] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CDiscoveryRule->get() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT i.itemid,i.name FROM items i WHERE i.flags=1 AND 1=0] [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 [hosts.php:1351 → CFrontendApiWrapper->get() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->get() → CHost->addRelatedObjects() → CApiService->select() → DBselect() → pg_query() in include/db.inc.php:369]
- Error in query [SELECT t.hostid,t.ts_delete FROM host_discovery t WHERE t.hostid=11405] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
Below are the error at the time of template attaching to host,
- pg_query(): Query failed: ERROR: relation "item_rtdata" does not exist
- LINE 1: INSERT INTO item_rtdata (itemid) VALUES ('392464')
- ^ [hosts.php:717 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CHost->update() → CHost->massUpdate() → CHost->massAdd() → CHostGeneral->massAdd() → CHostGeneral->link() → CItem->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItem->createReal() → DB::insert() → DBexecute() → pg_query() in include/db.inc.php:487]
- Error in query [INSERT INTO item_rtdata (itemid) VALUES ('392464')] [ERROR: relation "item_rtdata" does not exist
- LINE 1: INSERT INTO item_rtdata (itemid) VALUES ('392464')
- ^]
- SQL statement execution has failed "INSERT INTO item_rtdata (itemid) VALUES ('392464')".
I need to solve for this ASAP as this is a production environment. Someone please help me here.
Thanks.