How to handle retries of snmpset

I have a scalar to be configured on my system.
I have override the commit function of this scalar, add some handling functions there.

When I test the code, I found some issues:

  1. the commit function returned very fast less than 1 second, but per the package captured, it seem that SNMP4J took more than 1 second to send out “get-response”. this triggered retrying from the client side.
  2. then “set-request” are send several times for retry, and SNMP4J invoke the “commit” function for several times, for the snmpset of same request-id. I thought the retry is for UDP transport layer, if SNMP4J have receive the request, it means transport layer is OK, the same request should not be send to application layer multiple times. Could SNMP4J block the duplicate request with same request-id?
    Looking forward to your help. Thanks.


Hi Terry,

When you write “SNMP4J” in the above, you meant “SNMP4J-Agent” - that is just a remark for others reading this.
SNMP4J does not take 1 second to send out a response on a “normal” device. Please check if you are not stealing CPU cycles with your instrumentation code (maybe by other objects blocking a concurrent request).
SNMP4J-Agent already blocks retries on requests that are being processed. But of course, it will not block requests with request-IDs that have been completely processed already. Such a behaviour would not comply to the requirements of the SNMP standards.

Best regards,

Thanks for reply, Frank. I will check my code