[SNMP4J] Behaviour of ResponseListener in SNMP V3

Frank Fock fock at agentpp.com
Mon Oct 3 23:06:59 CEST 2016


Hi Peter,

Yes, the ResponseEvent should be returned after the timeout with a null 
response.
 From the log, it is unclear why you do not get the event. Is there an 
if-statement
that ignores the ResponseEvent with null response in your code?

Best regards,
Frank

Am 30.09.2016 um 10:12 schrieb Peter Verthez:
> Hi Frank,
>
> If we are using asynchronous SNMP calls with SNMPv3, what should be 
> the behaviour in case of timeout, when you used wrong credentials such 
> as a wrong user name.    Should the ResponseListener always be 
> triggered, with event.getResponse() = null, after the timeout?
>
> I would expect that, but it looks like this is not what I'm seeing: 
> the ResponseListener does not seem to be triggered in that case. So 
> this means that our application never knows that a timeout occurred.   
> We are using currently SNMP4J 2.5.0.   Debug logging from SNMP4J:
>
> 2016-09-28 16:43:31,768 DEBUG [JM-49-Ping-Ping-4]-[org.snmp4j.Snmp] 
> Running pending async request with handle PduHandle[1071987217] and 
> retry count left 1
> 2016-09-28 16:43:31,768 DEBUG 
> [JM-49-Ping-Ping-4]-[org.snmp4j.transport.DefaultUdpTransportMapping] 
> Sending message to 135.249.41.44/161 with length 268: 
> 30:82:01:08:02:01:01:04:06:70:75:62:6c:69:63:a0:81:fa:02:04:3f:e5:3a:11:02:01:00:02:01:00:30:81:eb:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:09:03:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:17:01:06:00:05:00:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:0b:09:00:05:00:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:0b:02:00:05:00:30:12:06:0e:2b:06:01:04:01:84:7d:3d:01:23:3c:03:02:00:05:00:30:0c:06:08:2b:06:01:02:01:01:03:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:17:01:07:00:05:00:30:0c:06:08:2b:06:01:02:01:01:02:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:17:01:03:00:05:00:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:09:0d:00:05:00:30:12:06:0e:2b:06:01:04:01:84:7d:3d:01:17:02:01:04:01:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:09:1c:01:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:09:1c:02:00:05:00
> 2016-09-28 16:43:35,771 DEBUG [SNMP4J Timer]-[org.snmp4j.Snmp] Running 
> pending async request with handle PduHandle[1071987217] and retry 
> count left 0
> 2016-09-28 16:43:35,771 DEBUG [SNMP4J 
> Timer]-[org.snmp4j.transport.DefaultUdpTransportMapping] Sending 
> message to 135.249.41.44/161 with length 268: 
> 30:82:01:08:02:01:01:04:06:70:75:62:6c:69:63:a0:81:fa:02:04:3f:e5:3a:11:02:01:00:02:01:00:30:81:eb:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:09:03:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:17:01:06:00:05:00:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:0b:09:00:05:00:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:0b:02:00:05:00:30:12:06:0e:2b:06:01:04:01:84:7d:3d:01:23:3c:03:02:00:05:00:30:0c:06:08:2b:06:01:02:01:01:03:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:17:01:07:00:05:00:30:0c:06:08:2b:06:01:02:01:01:02:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:17:01:03:00:05:00:30:10:06:0c:2b:06:01:04:01:84:7d:3d:01:09:0d:00:05:00:30:12:06:0e:2b:06:01:04:01:84:7d:3d:01:17:02:01:04:01:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:09:1c:01:00:05:00:30:11:06:0d:2b:06:01:04:01:84:7d:3d:01:09:1c:02:00:05:00
> 2016-09-28 16:43:36,861 DEBUG [SNMP4J Timer]-[org.snmp4j.Snmp] 
> PendingRequest canceled key=null, pdu=null, target=null, 
> transport=null, listener=null
> 2016-09-28 16:43:43,771 DEBUG [SNMP4J Timer]-[org.snmp4j.Snmp] Request 
> timed out: 1071987217
> 2016-09-28 16:43:43,772 DEBUG [SNMP4J Timer]-[org.snmp4j.Snmp] 
> Cancelling pending request with handle PduHandle[1071987217]
>
> Best regards,
> Peter.
>

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231




More information about the SNMP4J mailing list