[SNMP4J] Shutting down agent corrupts config properties

Frank Fock fock at agentpp.com
Wed Mar 23 07:51:10 CET 2016


Hi Matt,

This could only happen with a misconfiguration of the SampleAgent when 
the arguments for
command line options "c" and "cfg" are the same.
That will not work, because "c" is a binary file with persistence data and
"cfg" is a properties file with the initial configuration (which might 
be overwritten
with the lastet persistent data from "c".

You can disable persistence by providing "null" to the 
AgentConfigManager for
the "PersistenceProvider" parameter.

Best regards,
Frank

Am 23.03.2016 um 01:03 schrieb Matthew Shaver:
> I modified the SampleAgent code to call the agent shutdown() method 
> after testing. The SampleAgentConfig.properties file then has binary 
> data in it. When I run the SampleAgent again I get this exception:
>
> Exception in thread "main" java.lang.IllegalArgumentException: 
> Malformed \uxxxx encoding.
>     at java.util.Properties.loadConvert(Properties.java:568)
>     at java.util.Properties.load0(Properties.java:390)
>     at java.util.Properties.load(Properties.java:341)
>     at 
> com.yumecorp.snmpmon.sample.SampleAgent.<init>(SampleAgent.java:151)
>     at com.yumecorp.snmpmon.sample.SampleAgent.main(SampleAgent.java:475)
>
> I don't think I need persistence right now. How do I disable it?
>
> Thanks,
> Matt.
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231




More information about the SNMP4J mailing list