WebUI crash due to invalid data inserted in db by linkd
Description
As linkd is working again on Cisco Devices since release 8.2 we noticed several WebUI ArrayIndexOutofBounds-Exceptions when clicking on a node.
I've tracked this down to the following problem:
Some Cisco switches return values via Snmp oid .1.3.6.1.4.1.9.9.46.1.3.1.1.* for VLANs that in fact do not exist on the switch.
This causes linkd to insert Data in the VLAN Table with vlantype=-1 and vlanstatus=-1 that the WebUI cannot handle, resulting in an exception.
I don't know if it is corret that cisco is returning data in this oid for VLANs that do not exist, but you can fix this by not inserting data in the db with vlantype oder vlanstatus set to '-1' which in fact means that this data has never returned by the switch an the VLAN does not exist.
Similar problems exist in the stpinterface table. I have several switches that cause linkd to populate stpportstate with '-1'
Feel free to ask me for more information if needed.
Seth Leger (community account) October 12, 2010 at 3:12 PM
Wait, never mind. There is a full stack trace inside . I'm going to mark this bug as a duplicate of that bug.
This bug has been marked as a duplicate of ***
Seth Leger (community account) October 12, 2010 at 3:10 PM
Hi Christian,
Can you paste the stack trace from the ArrayIndexOutofBoundsException into this bug? That will make it somewhat easier to track down this issue, although I already have a good idea of what to do based on similar issues in other linkd classes. Thanks!
Joerg Eichhorst August 30, 2010 at 9:12 AM
same problem with several
ProCurve J9452A Switch 6600ml-48G-4XG, revision K.14.47, ROM K.12.20 (/sw/code/build/btm(t4a))
As linkd is working again on Cisco Devices since release 8.2 we noticed several WebUI ArrayIndexOutofBounds-Exceptions when clicking on a node.
I've tracked this down to the following problem:
Some Cisco switches return values via Snmp oid .1.3.6.1.4.1.9.9.46.1.3.1.1.* for VLANs that in fact do not exist on the switch.
This causes linkd to insert Data in the VLAN Table with vlantype=-1 and vlanstatus=-1 that the WebUI cannot handle, resulting in an exception.
I don't know if it is corret that cisco is returning data in this oid for VLANs that do not exist, but you can fix this by not inserting data in the db with vlantype oder vlanstatus set to '-1' which in fact means that this data has never returned by the switch an the VLAN does not exist.
Similar problems exist in the stpinterface table. I have several switches that cause linkd to populate stpportstate with '-1'
Feel free to ask me for more information if needed.