Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-1668

ERROR: insert or update on table "notifications" violates foreign key constraint "fk_eventid3"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10.13, 1.12.0
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      1593

      Description

      This was seen at a customer running trunk:

      org.postgresql.util.PSQLException: ERROR: insert or update on table "notifications" violates foreign key
      constraint "fk_eventid3"
      Detail: Key (eventid)=(<event id>) is not present in table "events".
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:
      354)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate
      (NewProxyPreparedStatement.java:105)
      at org.opennms.netmgt.config.NotificationManager.insertNotice(NotificationManager.java:628)
      at org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent
      (BroadcastEventProcessor.java:496)
      at org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:
      216)
      at org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl$ListenerThread.run
      (EventIpcManagerDefaultImpl.java:172)
      at java.lang.Thread.run(Thread.java:595)

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              dgregor DJ Gregor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: