vlan.vlantype set to -1 for newly discovered node, causes webui crash when viewing node.
Description
Environment
Acceptance / Success Criteria
Attachments
blocks
is duplicated by
Lucidchart Diagrams
Activity

Christian Kober October 14, 2010 at 8:58 AM
Hi Seth,
O.K., thanks! I'll report back if 1.8.5 is released.
Christian

Seth Leger (community account) October 13, 2010 at 10:01 AM
Hi Christian,
I also updated the code for stpinterface and stpnode to prevent these array exceptions. The UI should not crash any more in cases where it encounters an invalid array index (index <= 0). I've made the default value for stpinterface.stpportstate to be '1' which meant 'disabled' (since there was no enumerated value that meant 'unknown') so if you want to clean up your database, you can change all values of stpinterface.stpportstatus from -1 to 1.
It might be more appropriate to create an 'unknown' status; let me know if you think this would be a better solution. If so, please open a new bug about this issue.
Thanks!

Christian Kober October 13, 2010 at 4:48 AM
Seth,
did you notice my remark on the stpporttype in NMS-4095?
> Similar problems exist in the stpinterface table. I have several switches that
> cause linkd to populate stpportstate with '-1'
Is it possible to fix this on the fly or should I open a new bug for that?
Christian

Seth Leger (community account) October 12, 2010 at 5:41 PM
This problem has been fixed by using proper constants for the array indices inside Vlan.java. If you are having this issue, you should also go back and delete rows in the vlan table that have '-1' as the value for vlan.vlantype or vlan.vlanstatus (or you can set the values to '0' which is now the value for 'Unknown') to clean the database up but the code should handle the -1 value without crashing. Marking as fixed.
commit c388e4d828920ce325506d8cf1ae07a3a4dd0027

Seth Leger (community account) October 12, 2010 at 3:12 PM
has been marked as a duplicate of this bug. ***
I recently upgraded to opennms 1.8.3 (Debian lenny package, details in attached file).
Last night, opennms discovered a new node. When viewing this node in the webui, a exception is thrown: (java.lang.ArrayIndexOutOfBoundsException: -1 ; full stack trace attached).
This is occuring, it seems, because vlan.vlantype is set to -1. Other nodes have this field set to NULL, I believe.