[SNMP4J] SNMP4J agent - different behaviour with different clients

Young, Alistair alistair.young at logica.com
Wed Mar 11 15:00:33 CET 2009


Hello,

I received an e-mail off-list confirming that this was a problem with the Mibble software.  In case it proves useful to somebody else in the future, the solution is as follows:

Go to Westhawk's site (http://snmp.westhawk.co.uk/) and download their version 6.0 of the SNMP stack.  Copy it into Mibble's lib directory, then go to Mibble's bin directory and modify the setenv.bat and setenv.sh scripts to use snmp6_0.jar instead of the snmp4_13.jar.  Once you've done that, it will do the automatic discovery of the engine ID.

This did the trick for me: both net-snmp and Mibble are happily talking to my agent.

Cheers,


Alistair.

-----Original Message-----
From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On Behalf Of Young, Alistair
Sent: 10 March 2009 10:26
To: snmp4j at agentpp.org
Subject: [SNMP4J] SNMP4J agent - different behaviour with different clients

Hi,
 
I've just started working with SNMP4J (and SNMP in general), and have been very impressed with how quickly the library has helped me to get something up and running.  However, I could use a little help.
 
I've built a very simple agent based upon TestAgent, and I've tried it with two separate clients: net-snmp's snmpget and the graphical browser Mibble.  When I use net-snmp, I successfully retrieve the value I'm looking for.  Mibble, however, times out.
 
With the help of a packet sniffer, and plenty of debug information, I've uncovered the following...
 
net-snmp snmpget:

*	net-snmp issues a non-specific 'get', specifying no engine ID,
boot count or time
*	agent responds with 1.3.6.1.6.3.15.1.1.4.0 ('unknown engine ID')
- the report includes the correct engine ID, plus boot count and time both set to zero
*	net-snmp issues a 'get' for the desired OID, with the correct
engine ID, plus boot count and time both set to zero
*	agent responds with 1.3.6.1.6.3.15.1.1.2.0 ('not in time
window') - the report includes the correct engine ID, plus correct boot count and time
*	net-snmp issues a 'get' for the desired OID, with the correct
engine ID, plus correct boot count and time
*	agent responds with the requested information

Mibble:

*	Mibble issues a 'get' for the desired OID, with the incorrect
engine ID and some non-zero values for boot count and time
*	agent throws some exceptions (Mibble retries a number of times,
each time causing an exception)
*	the Mibble request times out

The exception (manually transcribed, so forgive any typos!) is:
 
java.lang.NullPointerException
    at org.snmp4j.mp.MPv3.prepareDataElements(MPv3.java:1103)
    at
org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.j
ava:263)
    ...
 
I'm using SNMP v3 with an 'authNoPriv' user.  I'm building against snmp4j-1.9.3d and snmp4j-agent-1.2.2.
 
I've also tried querying a net-snmp agent using both client tools.  With net-snmp as the agent, both client tools get the value they're looking for.
 
Can anybody help to explain what is going on?  Might I have misconfigured by agent in some way?
 
Any help would be appreciated!
 
Thanks,
 
 
Alistair.


Please help Logica to respect the environment by not printing this email  /  Merci d'aider Logica à préserver l'environnement en évitant d'imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j


Please help Logica to respect the environment by not printing this email  /  Merci d'aider Logica à préserver l'environnement en évitant d'imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.





More information about the SNMP4J mailing list