Hi Syed,

The exception might be thrown because of mixing IPv4 and IPv6 on the same
TransportMapping which is not supported by some operating systems.

In SNMP4J 2.2.6 the root cause will be included in the MessageException. In SNMP4J 1.x you may enable the debugging log level to get the original stack trace printed to the
console.

Best regards,
Frank


Am 25.02.2014 18:23, schrieb Ali, Syed F:
Hi,

I'm using snmp4j 1.11.1 in our application and occasionally, we're seeing this 
exception encountered when trying to send an SNMP get request:
org.snmp4j.MessageException: Protocol family unavailable
                 at 
org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:485)[195:org.snmp4j:1.11.1]
                 at 
org.snmp4j.util.MultiThreadedMessageDispatcher.sendPdu(MultiThreadedMessageDispatcher.java:146)[195:org.snmp4j:1.11.1]
                 at 
org.snmp4j.Snmp.sendMessage(Snmp.java:1082)[195:org.snmp4j:1.11.1]
                 at org.snmp4j.Snmp.send(Snmp.java:971)[195:org.snmp4j:1.11.1]
                 at org.snmp4j.Snmp.send(Snmp.java:955)[195:org.snmp4j:1.11.1]
...
... (stack truncated)

I looked at the snmp4j code for 1.11.1 and it basically catches an IOException and wraps 
only the message from the exception into the "MessageException" as below:
Line 485:      throw new MessageException(iox.getMessage());


1)      Any idea what would cause the IOException to be thrown?


2)      If the code set the IOException as the cause of the MessageException, 
we could unwind the whole exception cause chain, and find out the root cause of 
the IOException, like:
throw new MessageException( iox );

Thanks,
Syed

Syed F. Ali
CA Technologies


_______________________________________________
SNMP4J mailing list
[email protected]
https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j

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

_______________________________________________
SNMP4J mailing list
[email protected]
https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j

Reply via email to