Hi,

We use SNMP4j 1.11 version. Recently we have been seeing a lot of socket closed 
exceptions while sending SNMP get/set messages. We have been using this version 
of SNMP4J for a long time in our application (and we have not modified the way 
we use the SNMP4J API at all) and we have never seen this before. This happens 
when we try to send a set of SNMP requests within a short period of time to 
different hosts (like periodic SNMP polling of a group of devices). Any ideas 
why this is happening ? Once this happens the only way to recover from this 
state is to restart my application.

This is a sample exception that I see in my log file.

[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR: 
java.net.SocketException: Socket is closed
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at java.net.DatagramSocket.send(Unknown Source)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
org.snmp4j.transport.DefaultUdpTransportMapping.sendMessage(DefaultUdpTransportMapping.java:115)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
org.snmp4j.MessageDispatcherImpl.sendMessage(MessageDispatcherImpl.java:195)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:462)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at org.snmp4j.Snmp.sendMessage(Snmp.java:1078)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at org.snmp4j.Snmp.send(Snmp.java:891)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at org.snmp4j.Snmp.send(Snmp.java:871)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at org.snmp4j.Snmp.send(Snmp.java:836)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at com.optelian.common.SnmpRequest.send(SnmpRequest.java:396)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at com.optelian.common.SnmpRequest.send(SnmpRequest.java:370)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
com.optelian.common.OMSSnmp4JDeviceInterface.readFields(OMSSnmp4JDeviceInterface.java:353)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at com.optelian.common.OMSDeviceManager.readFields(OMSDeviceManager.java:74)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
com.optelian.topology.server.util.ShelfInterface.readProperties(ShelfInterface.java:220)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
com.optelian.topology.server.util.ShelfInterface.readReleaseString(ShelfInterface.java:170)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
com.optelian.topology.server.discovery.ShelfPolling.pollOMSNode(ShelfPolling.java:181)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at 
com.optelian.topology.server.discovery.ShelfPolling.run(ShelfPolling.java:63)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[09 Jul 2014 13:44:20:653]  [ polling-11                ] SYS_ERR:              
  at java.lang.Thread.run(Unknown Source)

Any help in debugging this problem is much appreciated.

Thanks,
Prema

_______________________________________________
SNMP4J mailing list
[email protected]
https://oosnmp.net/mailman/listinfo/snmp4j

Reply via email to