[SNMP4J] Problems with DefaultTCPTransportMapping

Daphna Wasserman (dwasserm) dwasserm at cisco.com
Sun May 4 17:02:20 CEST 2008


Hi,

 

Our application forwards SNMP V2 traps to different clients listening on
either TCP or UDP. For each combination of address+port we create a
dedicated thread, and if the connection is of type TCP, we create an
instance of DefaultTCPTransportMapping and use it to send messages to
the specific client.

 

Currently we are using snmp4j.jar version 1.7.1 + java 1.5.0_08-b03

 

We have an issue in which after we restart the client (while the server
keeps trying to send traps to the client) , the new client instance does
not receive traps from the server any longer. We see the following
message at the server log:

May 04 2008 16:10:02.469 IDT Snmp4JLogAdapter.debug DEBUG
{64.103.124.103/50004=SocketEntry[peerAddress=64.103.124.103/50004,socke
t=Socket[unconnected],lastUse=Sun May 04 14:56:08 IDT 2008]}

May 04 2008 16:10:03.339 IDT Snmp4JLogAdapter.debug DEBUG Looking up
connection for destination '64.103.124.103/50004' returned:
SocketEntry[peerAddress=64.103.124.103/50004,socket=Socket[unconnected],
lastUse=Sun May 04 14:56:08 IDT 2008]

 

We've tried upgrading snmp4j to 1.8.2 and even to 1.9.1e with no
improvement - after the client was restarted traps were still not
received, and the following error appeared in the server log:

 

May 04 2008 11:46:35.015 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut: java.lang.Exception: Stack trace

May 04 2008 11:46:35.015 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut: at java.lang.Thread.dumpStack(Thread.java:1158)

May 04 2008 11:46:35.015 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut: at
com.cisco.nm.cmp.net.protocols.snmp.Snmp4JLogAdapter.dumpFurtherInfo(Snm
p4JLogAdapter.java:152)

May 04 2008 11:46:35.015 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut:          at
com.cisco.nm.cmp.net.protocols.snmp.Snmp4JLogAdapter.error(Snmp4JLogAdap
ter.java:57)

May 04 2008 11:46:35.015 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut:          at
org.snmp4j.transport.DefaultTcpTransportMapping$ServerThread.processPend
ing(Unknown Source)

May 04 2008 11:46:35.015 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut:          at
org.snmp4j.transport.DefaultTcpTransportMapping$ServerThread.run(Unknown
Source)

May 04 2008 11:46:35.017 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut:          at java.lang.Thread.run(Thread.java:595)

May 04 2008 11:46:35.017 IDT Throwable.printStackTrace ERROR
>>>>>>>>SOut:          at
org.snmp4j.util.DefaultThreadFactory$WorkerThread.run(Unknown Source)

May 04 2008 11:46:35.017 IDT Snmp4JLogAdapter.debug DEBUG Firing
transport state event:
org.snmp4j.transport.TransportStateEvent[source=org.snmp4j.transport.Def
aultTcpTransportMapping at 7546a399,peerAddress=64.103.124.103/50004,newSta
te=4,cancelled=false,causingException=java.nio.channels.ClosedChannelExc
eption]

May 04 2008 11:46:35.017 IDT Snmp4JLogAdapter.error ERROR
java.nio.channels.ClosedChannelException

 

We'll appreciate your help 

Thanks

Daphna

 

 

 

 




More information about the SNMP4J mailing list