Snmptrapd fails to post link events if module name is unknown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold | ||
4.3 |
Won't Fix
|
Medium
|
Morten Brekkevold | ||
4.4 |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
Logs from some customers indicate that the snmptrapd keeps failing to insert link events into the database, due to violations of a non-null constraint when inserting to the eventqvar table. This is the logged error message:
[2016-01-11 09:13:06,727] [ERROR] [pid=18141 nav.snmptrapd] Error when handling trap with nav.snmptrapd.
Traceback (most recent call last):
File "/usr/lib/
accepted = mod.handleTrap(
File "/usr/lib/
modulename, ifname, ifalias)
File "/usr/lib/
event.post()
File "/usr/lib/
return EventQ.
File "/usr/lib/
cursor.
IntegrityError: null value in column "val" violates not-null constraint
The corresponding logs from PostgreSQL look like this:
2016-01-11 09:13:06 CET ERROR: null value in column "val" violates not-null constraint
2016-01-11 09:13:06 CET STATEMENT: INSERT INTO eventqvar (eventqid, var, val)VALUES (3337984, 'module', NULL)
Reviewing the code of the linkupdown plugin reveals that it will attempt to store the module name regardless of whether it has any value. Since this is a transaction, most likely the entire event is aborted.
Changed in nav: | |
status: | Fix Committed → Fix Released |
fix here: https:/ /nav.uninett. no/hg/default/ rev/f81b70ccc7f 6