WARN [scanExecutor-2] o.o.n.p.d.s.HostResourceSWRunDetector: Unexpected exception during SNMP poll of interface 10.146.1.201 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) ~[?:1.8.0_101] at antlr.StringUtils.stripFrontBack(StringUtils.java:83) ~[antlr-2.7.7.jar:?] at org.opennms.netmgt.provision.detector.snmp.HostResourceSWRunDetector.stripExtraQuotes(HostResourceSWRunDetector.java:164) ~[opennms-detector-simple-18.0.1.jar:?]
Seems like the detector is misguided by the additional CHR(34), which are escaped, but not recognized as part of the response.
STRING: " \"C:
Exception at antlr.StringUtils.stripFrontBack()
Environment
Linux x64, Java Runtime: Java SE Runtime Environment (1.8.0_101-b13),
Custom service whith hrSWRunParameters:
<service name="QSYS.TCE.Laser" interval="300000" user-defined="false"
status="on">
<parameter key="serviceNameOid" value="1.3.6.1.2.1.25.4.2.1.5"/>
<parameter key="serviceToDetect" value="TCE_Laser"/>
</service>
Win-SNMP-Agents responds with:
HOST-RESOURCES-MIB::hrSWRunParameters.9516 = STRING: "
\"C:\\Windows\\system32\\ServerManager.msc\" "
provisiond.log shows an error:
WARN [scanExecutor-2] o.o.n.p.d.s.HostResourceSWRunDetector: Unexpected
exception during SNMP poll of interface 10.146.1.201
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967) ~[?:1.8.0_101]
at antlr.StringUtils.stripFrontBack(StringUtils.java:83)
~[antlr-2.7.7.jar:?]
at
org.opennms.netmgt.provision.detector.snmp.HostResourceSWRunDetector.stripExtraQuotes(HostResourceSWRunDetector.java:164)
~[opennms-detector-simple-18.0.1.jar:?]
Seems like the detector is misguided by the additional CHR(34), which are escaped, but not recognized as part of the response.
STRING: " \"C:
Exception at antlr.StringUtils.stripFrontBack()