[SNMP4J] what does protocol family unavailable exception mean

Ali, Syed F Syed.Ali02 at ca.com
Tue Feb 25 18:23:21 CET 2014


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





More information about the SNMP4J mailing list