[SNMP4J] Newbie problem trying AgentJMX with error

Frank Fock fock at agentpp.com
Wed Jun 17 22:59:23 CEST 2009


Hi,

Why are you setting these com.sun.management.snmp.*
parameters? I guess you cannot use a port twice
on the same machine, right?

Best regards,
Frank

Wong, Noichi wrote:
> Hi all,
> 
>  
> 
> My environment
> 
> -Windows XP
> 
> -JDK 1.5.0_16
> 
> -Tomcat 5.5.27 
> 
> set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=2345
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> 
> set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.acl=true
> -Dcom.sun.management.snmp.interface=127.0.0.1
> -Dcom.sun.management.snmp.port=1666
> 
> -Net-SNMP 
> 
> All I have in my C:\net-snmp\etc\snmp\snmpd.conf is "rocommunity public"
> and I start NET-SNMP with c:\snmpd.exe
> 
>  
> 
> In JMXTestAgent.java main(), I have 'address = "127.0.0.1/161";'
> 
> and in addNotificationTargets mtehod, I tried changing
> UdpAddress("127.0.0.1/162") to UdpAddress("127.0.0.1/1666") but no luck.
> 
>  
> 
> I am getting this error when I run JMXTestAgent.java
> 
> Jun 17, 2009 12:13:50 PM org.snmp4j.log.JavaLogAdapter log
> 
> SEVERE: java.lang.reflect.InvocationTargetException
> 
> Exception in thread "main" java.lang.NullPointerException
> 
>       at org.snmp4j.MessageDispatcherImpl.addTransportMapping(Unknown
> Source)
> 
>       at org.snmp4j.Snmp.addTransportMapping(Unknown Source)
> 
>       at org.snmp4j.agent.BaseAgent.initSnmpSession(BaseAgent.java:437)
> 
>       at
> org.snmp4j.agent.BaseAgent.initMessageDispatcher(BaseAgent.java:431)
> 
>       at org.snmp4j.agent.BaseAgent.init(BaseAgent.java:135)
> 
>       at
> org.snmp4j.agent.mo.jmx.example.JMXTestAgent.main(JMXTestAgent.java:267)
> 
>  
> 
> Any help would be greatly appreciated.
> 
>  
> 
> Ultimately, if I run 'c:\ snmpwalk -On -v 2c -c public 127.0.0.1' I
> should see information from my Tomcat's JVM, correct?
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> Regards,
> 
> Royce
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list