[SNMP4J] Determining the source of a timeout

Frank Fock fock at agentpp.com
Wed Jan 2 18:56:23 CET 2008


Hi Rodney,

The way you solved the problem is the recommended one.
SNMP4J cannot return the peer address of a timed out
request, because it simply cannot know it. The peer
address is NOT equal to the target address!
Both addresses almost always have a different transport
port and in some cases even have a different IP address
(for example for systems with multiple IP addresses).

Best regards,
Frank

Beede, Rodney D. wrote:
> I'm doing an asynchronous request to a machine that I know is not accepting SNMP requests.  As expected my ResponseListener.onResponse(...) method is being called with event.getResponse() being null indicating a timeout.
> 
> Unfortunately the event.getPeerAddress() is also returning null which makes it difficult for me to determine what host actually timed out.  My current work around is to use event.getUserObject() to pass the remote machine's IP address.
> 
> Does anybody know of another method that allows one to get the peer address when a timeout occurs on an asynchronous connection?  It would be nice of the snmp4j library still populated getPeerAddress() even when a timeout occurred so I wouldn't have to use my getUserObject on that.
> 
> 
> Rodney Beede
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

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




More information about the SNMP4J mailing list