When I add one of my templates to host I get this error:
I thought there may be problem with that this template was linked to other templates, but when I unlinked them the error is still there. It was showing in 1.8.2 and also after upgrade to 1.8.7.
Strange thing is that I can run this insert query on database using psql and there is no error message.
Any ideas highly appreciated.
Code:
pg_query(): Query failed: ERROR: duplicate key value violates unique constraint "auditlog_pkey" [include/db.inc.php:546]
Error in query [INSERT INTO auditlog (auditid,userid,clock,ip,action,resourcetype,resourceid,resourcename) values (10746,1,1316949297,'83.21.7.37',0,13,14640,'monitoring.esyscoder.net:Server {HOSTNAME} is unreachable')] [ERROR: duplicate key value violates unique constraint "auditlog_pkey"]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [SELECT h.* FROM hosts h, hosts_templates ht WHERE h.hostid=ht.hostid AND (ht.templateid IN (10125)) ] [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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [select * from triggers where triggerid=13796] [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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
No trigger with triggerid=[13796]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [SELECT t2.triggerid, t2.expression FROM triggers t2, functions f1, functions f2, items i1, items i2 WHERE f1.triggerid=13796 AND i1.itemid=f1.itemid AND f2.function=f1.function AND f2.parameter=f1.parameter AND i2.itemid=f2.itemid AND i2.key_=i1.key_ AND i2.hostid=10125 AND t2.triggerid=f2.triggerid AND t2.description='' AND t2.templateid=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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
pg_query(): Query failed: ERROR: syntax error at or near "," LINE 1: ...nts,url,value,expression,templateid) VALUES (0,'',,,,'','',2... ^ [include/db.inc.php:546]
Error in query [INSERT INTO triggers (triggerid,description,type,priority,status,comments,url,value,expression,templateid) VALUES (0,'',,,,'','',2,'0',13796)] [ERROR: syntax error at or near "," LINE 1: ...nts,url,value,expression,templateid) VALUES (0,'',,,,'','',2... ^]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [select * from triggers where triggerid=13795] [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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
No trigger with triggerid=[13795]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [SELECT t2.triggerid, t2.expression FROM triggers t2, functions f1, functions f2, items i1, items i2 WHERE f1.triggerid=13795 AND i1.itemid=f1.itemid AND f2.function=f1.function AND f2.parameter=f1.parameter AND i2.itemid=f2.itemid AND i2.key_=i1.key_ AND i2.hostid=10125 AND t2.triggerid=f2.triggerid AND t2.description='' AND t2.templateid=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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
pg_query(): Query failed: ERROR: syntax error at or near "," LINE 1: ...nts,url,value,expression,templateid) VALUES (0,'',,,,'','',2... ^ [include/db.inc.php:546]
Error in query [INSERT INTO triggers (triggerid,description,type,priority,status,comments,url,value,expression,templateid) VALUES (0,'',,,,'','',2,'0',13795)] [ERROR: syntax error at or near "," LINE 1: ...nts,url,value,expression,templateid) VALUES (0,'',,,,'','',2... ^]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [SELECT DISTINCT t.triggerid, t.templateid FROM triggers t, functions f, items i WHERE i.hostid=10125 AND f.itemid=i.itemid AND f.triggerid=t.triggerid AND t.templateid > 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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [SELECT DISTINCT td.* FROM items i, functions f, triggers t, trigger_depends td WHERE i.hostid=10125 AND f.itemid=i.itemid AND t.triggerid=f.triggerid AND ( (td.triggerid_up=t.templateid) OR (td.triggerid_down=t.templateid) )] [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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:445]
Error in query [SELECT h.hostid FROM hosts h WHERE (h.hostid IN (10125)) AND ((h.hostid BETWEEN 000000000000000 AND 099999999999999)) AND h.status IN (0,1,3)] [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:619]
pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:621]
You do not have permission to perform this operation
Cannot sync template
Cannot link template
Host update failed
Strange thing is that I can run this insert query on database using psql and there is no error message.
Any ideas highly appreciated.
Comment