Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Fixed
-
17.1.1
-
Security Level: Default (Default Security Scheme)
-
None
Description
I have several events nodeDown/nodeUp on the same node.
Each event nodeDown trigger a notification.
And of course when the nodeUp comes I expect that the notification is automatically acknowledged.
notifd-configuration.xml:
<notifd-configuration status=“on” match-all="true”>
<auto-acknowledge-alarm resolution-prefix="RESOLVED: “/>
<queue>
<queue-id>default</queue-id>
<interval>20s</interval>
<handler-class>
<name>org.opennms.netmgt.notifd.DefaultQueueHandler</name>
</handler-class>
</queue>
</notifd-configuration>
What happens on my system is that not all notifications are acknoledged.
So there are notification that should be ack but there are still outstanding.
I have exception in log but seems not to be related with the auto-ack.
2016-11-21 06:00:05,410 ERROR [Thread-4808155] o.o.n.n.NotificationTask: Could not insert notice info into database, aborting send notice
org.postgresql.util.PSQLException: ERROR: insert or update on table "usersnotified" violates foreign key constraint "fk_notifid2"
Detail: Key (notifyid)=(1602752) is not present in table "notifications".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) ~[postgresql-9.3-1100-jdbc4.jar:?]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) ~[postgresql-9.3-1100-jdbc4.jar:?]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-9.3-1100-jdbc4.jar:?]
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560) ~[postgresql-9.3-1100-jdbc4.jar:?]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[postgresql-9.3-1100-jdbc4.jar:?]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) ~[postgresql-9.3-1100-jdbc4.jar:?]
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105) ~[c3p0-0.9.1.2.jar:0.9.1.2]
at org.opennms.netmgt.config.NotificationManager.updateNoticeWithUserInfo(NotificationManager.java:812) ~[opennms-config-17.1.1.jar:?]
at org.opennms.netmgt.notifd.NotificationTask.run(NotificationTask.java:250) [opennms-services-17.1.1.jar:?]
They seems related to deleted notifications.