[SNMP4J] After 4-5 hours, I see this exception

Kumaril Bhattacharya (kumarilb) kumarilb at cisco.com
Sat Aug 18 20:37:07 CEST 2007


Hi,
         We are using the version 1.7.1 (snmp4j.jar - size 329358) --
with class files showing dates of April 25th, 2006
 
In the logs I am seeing the following error. And I see that the TCP port
has gone into CLOSE_WAIT state (probably after 4-5 hours) after I start
sending
messages using DefaultTcpTransportMapping.
 
 
Aug 17 2007 22:22:22.124 PDT java.lang.ThreadGroup.uncaughtException
ERROR >>>>>>>>SOut: Exception in thread
"DefaultTCPTransportMapping_172.25.124.10/0"
Aug 17 2007 22:22:22.124 PDT java.lang.Throwable.printStackTrace ERROR
>>>>>>>>SOut: java.nio.channels.CancelledKeyException
Aug 17 2007 22:22:22.125 PDT java.lang.Throwable.printStackTrace ERROR
>>>>>>>>SOut:    at
sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
Aug 17 2007 22:22:22.125 PDT java.lang.Throwable.printStackTrace ERROR
>>>>>>>>SOut:    at
sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:69)
Aug 17 2007 22:22:22.125 PDT java.lang.Throwable.printStackTrace ERROR
>>>>>>>>SOut:    at
java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:342)
Aug 17 2007 22:22:22.125 PDT java.lang.Throwable.printStackTrace ERROR
>>>>>>>>SOut:    at
org.snmp4j.transport.DefaultTcpTransportMapping$ServerThread.run(Default
TcpTransportMapping.java:615)

 
Will this be corrected by doing "setConnectionTimeout
<http://www.snmp4j.org/doc/org/snmp4j/transport/DefaultTcpTransportMappi
ng.html#setConnectionTimeout%28long%29> (long connectionTimeout)" on
DefaultTcpTransportMapping ?
However this is not available in 1.7.1. 
Which version should I be moving to ?
 
Thanks,
Kumaril



More information about the SNMP4J mailing list