[SNMP4J] snmp4j timeouts even when response is received

Senthil Muniswamy senthil.muniswamy at gmail.com
Tue Jul 24 04:39:34 CEST 2012


Async? Cancel helps.

 // sending request
   ResponseListener listener = new ResponseListener() {
     public void onResponse(ResponseEvent event) {
       // Always cancel async request when response has been received
       // otherwise a memory leak is created! Not canceling a request
       // immediately can be useful when sending a request to a broadcast
       // address.
       ((Snmp)event.getSource()).cancel(event.getRequest(), this);
       System.out.println("Received response PDU is: "+event.getResponse());
     }
   };

On Mon, Jul 23, 2012 at 4:46 PM, Prema Upot <prema.upot at optelian.com> wrote:
> Hi,
>
> We see timeouts in snmp4j intermittently for snmp get requests even though the response is received well within the timeout period. When debug is turned on, I see messages like "Received response that cannot be matched to any outstanding request, address...". The timeout set is 8 seconds and the actual response is received within a few milliseconds (as seen in snmp4j logs). The snmp4j version is 1.11. Has anyone seen this problem ?
>
> Thanks,
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j



More information about the SNMP4J mailing list