[SNMP4J] Misleading timeout/retries info when logging Target but using a custom TimeoutModel that does not use Target's timeout/retries

Jamie Bisotti jbisotti at gmail.com
Tue Mar 25 07:36:08 CET 2008


Just passing this along so others don't waste as much time tracking it down
as I did...

We're using a custom TimeoutModel, that allows for variable length retries (
e.g. 500, 1000, 2500, 6000).  An instance of that gets put into our Snmp
instance.  Then, our CommunityTarget gets created, and it has a default
timeout of 1000.  This is what caused my "problem".  The CommunityTarget has
a timeout, but it is not used in my implementation of TimeoutModel.  Maybe
I'm doing something incorrect?  The problem was that when a request
timed-out, I was logging the CommunityTarget, which looked something like
this:

...target=CommunityTarget[address=10.200.1.23/161, version=0, timeout=1000,
retries=0, community=public]...

The 'timeout' of 1000 and the 'retries' of 0 threw me for a loop; I couldn't
figure out where they were coming from.  'retries' should have been 3 and
'timeout' should have depended on which retry it was.

After looking through the snmp4j source a couple of times it finally dawned
on my what was going on.

-- 
Jamie Bisotti



More information about the SNMP4J mailing list