500 Server Error when sending events from GUI when OpenNMS has large number of Events configured

Description

Hi Team,

Noticed 500 Server Error when Client is trying to send an Event from OpenNMS GUI, this happens when loads of events have been configured in /opt/opennms/etc/eventconf.xml file.

You go to HOME > ADMIN > SEND EVENT and immediately on pageload you’re getting this error.

 

 

Given on page load of this sendevent.htm all the events from eventfiles in eventconf.xml are pulled in, and given that customer has 1811 event files which have total 81217 events in them, loading all those event-ueis is causing the null pointer exception.

I was able to recreate the same with clients eventconf.xml and all related event files.

Acceptance / Success Criteria

None

Attachments

5

Activity

Show:

Jahanzeb Akhtar November 13, 2024 at 12:22 PM

Added a check for null value, logs a warning that event label is null

Sriraag Sridhar November 6, 2024 at 10:44 AM

Gotcha Appreciate the details, thanks.

Jahanzeb Akhtar November 6, 2024 at 10:43 AM

I debugged it, one by one, going through each event. It is not logged because in SendEventContoller it goes through each event, getting uei and event label from each event, then it stores event label as a key and uei as a value in a TreeMap. So if event label is null it throws a NullPointerException.

 

Sriraag Sridhar November 6, 2024 at 10:38 AM

Thanks

Just curious, where did you find this issue logged... Config-tester dint point this if I recall.

 

Jahanzeb Akhtar November 6, 2024 at 10:35 AM

Some events in Blocking.events.xml and BGP4-V2-MIB-JUNIPER.events.xml don’t have event-label property. Please add event labels where they are missing because it’s a mandatory field.
PS: I commented out these two files in eventconf.xml and clicked on HOME > ADMIN > SEND EVENT. It is working perfectly fine giving almost 43 thousand + events in drop-down.

Fixed

Details

Assignee

Reporter

HB Grooming Date

HB Backlog Status

FD#

Sprint

Affects versions

Priority

PagerDuty

Created August 16, 2024 at 3:39 PM
Updated December 10, 2024 at 1:31 PM
Resolved November 13, 2024 at 12:22 PM