[SNMP4J] Problem receiving v3Traps over TCP using DefaultTcpTransportMapping

Riyaz, Mohamed Mohamed.Riyaz at softwareag.com
Wed Nov 19 13:48:50 CET 2008


Hi,

 

I am using snmp4j (v1.9.2) for writing a V3Trap listener. The listener
should be able to receive 'hundreds of thousands' of V3Traps per day,
over TCP from multiple senders. When testing my listener implementation
I found that my listener goes into a deadlock, and stops listening when
the load increases (say 2 senders, sending Traps of size 500kilobytes
per 10milliseconds). The listener is running on a machine with the
following configuration: Intel Pentium (D) CPU 3.40GHz, Windows XP
Professional SP3, 2GB RAM, 100Mbps LAN.

 

When the problem occurred, TCPView shows around 40 TCP connections (for
my listener port) with almost all in ESTABLISHED state, barring a few in
CLOSE_WAIT state. I have attached the same.

 

Debug reveled the reason for this problem being the
java.nio.channels.Selector.select() call in
DefaultTcpTransportMapping$ServerThread.run() method blocks forever. I
even tried modifying the call with a timeout,
java.nio.channels.Selector.select(10000). Now there is no deadlock but
when the load increases the call always returns 0.

 

Has anyone faced a similar situation before? Is this problem inherent to
TCP or the Sun's NIO implementation? Please provide me some pointers to
solve the same.

 

PS: Please let me know if you need any further information regarding my
setup and code.

 

Thanks & Regards

Riyaz

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TCPView_Log.txt
URL: <http://oosnmp.net/pipermail/snmp4j/attachments/20081119/c2e32853/attachment.txt>


More information about the SNMP4J mailing list