More strange SNMP results
dan last edited by phildunlap
Hey guys, I have a basic SNMP v1 data source, I can do a manual lookup using an OID using both snmpwalk at a shell or the oid lookup:
But then when I add that same OID to it's own data point I get Trap not handled..
I've had a similar one previously where I just ended up adding a .1 on the end and it started working, but this time the green refresh button doesn't even seem to bring up an error. Just this vague log entry..
I tried putting the following into the log setup file to see if I can get more debug info.. I'm not sure if I have quite the right syntax for here.
<category name="com.infiniteautomation.snmp.rt"><level value="debug"/></category>
Any ideas would be awesome thanks.
also get this java error at the top occasionally when trying a refresh..
: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 Acknowledge
phildunlap last edited by phildunlap
Can you share the vague log entry? Are you referring to the "Trap not handled" message? I find it interesting the OID in the test tool image you submitted doesn't appear to be the same as the OID in the "Trap not handled" message. Unimportant?
Your syntax for enabling debug logging is correct! But, your guess at the package name is wrong, you're looking for com.serotonin.m2m2.snmp.rt and you may also wish to close your level element with a / before its >
Can you post the rest of that stack trace?
Hi Phil, you're right that is a different one. I can't seem to get any log entries to appear in the main ma.log file once I enable that line and restart the whole mango system,
I'll have another search of the log viewer and see if I can find the same oid ref.
hmm, yeh it doesn't seem to have enabled much more logging, this is the line I put in the log4j.xml file ..
<category name="com.serotonin.m2m2.snmp.rt"><level value="debug"/></category>
Hope I'm in the right file there.
The log file I was tailing is /opt/mango/logs/ma.log
I just got some response times, No debug of the actual response, is this normal?
DEBUG 2016-08-09 09:09:24,966 (com.serotonin.m2m2.snmp.rt.SnmpDataSourceRT.pollBatch:135) - Snmp request/response time: 3
DEBUG 2016-08-09 09:09:41,112 (com.serotonin.m2m2.snmp.rt.SnmpDataSourceRT.pollBatch:135) - Snmp request/response time: 3
DEBUG 2016-08-09 09:09:41,117 (com.serotonin.m2m2.snmp.rt.SnmpDataSourceRT.pollBatch:135) - Snmp request/response time: 6
it keeps throwing this one:
09:17:40 - 'Kaikorai Valley UPS - Test': java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
I looked at the data source after you said that and the logging is quite sparse. I'll find some time either tonight or tomorrow morning to add much more logging, and to print the stack trace wherever that exception is. I'll email it to you when I have it.
Thanks for that Phil.
The "Trap not handled" message means that OID was not matched, so no points had their values updated by it, yet it was in the message.
I think I may have found where that Array Index Exception is coming from, but I've still added some logging to be sure. Can you test and report?
Also, you can reload your logging settings without restarting Mango, if you have the Log4JReset module installed. Simply navigate to System Settings --> Log4J Reset and press the reload configuration button.
To include the resolution, version 1.5.3 has been released, which has better logging for that Array Index exception, and more handling such that if it occurs it doesn't damage the data source's poll. The Array Index exception seems to be from the SNMP4J code.
I've upgraded to this version of the module and it appears to be continuing if there is an exception which is handy, thanks.