• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exceptions on isReachable()

 
trebor iksrazal
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

The code below attempts to do InetAddress.isReachable() on all possible IP's in a subnet, and try to do snmp walk on those that respond. This code works ok, albeit slowly - 25 seconds on a class A subnet. Even worse, on a big class A subnet, I get "java.net.ConnectException: No buffer space available" after around 1000 InetAddress.isReachable() calls.

Any ideas? You can look at the unabriged version here:

http://www.braziloutsource.com/random/PerfSnmpScan.java

Thanks,
iksrazal

[ added [code] tags - Jim ]
[ May 30, 2006: Message edited by: Jim Yingst ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although the BlockingQueue and associated machinery are Thread-related, I suspect the salient details are in the networking code, so I'm moving this to the Sockets and Internet Protocols forum.
 
Andrew Trumper
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by trebor iksrazal:
Hi all,

The code below attempts to do InetAddress.isReachable() on all possible IP's in a subnet, and try to do snmp walk on those that respond. This code works ok, albeit slowly - 25 seconds on a class A subnet. Even worse, on a big class A subnet, I get "java.net.ConnectException: No buffer space available" after around 1000 InetAddress.isReachable() calls.


Sounds like InetAddress.isReachable() is leaking. It has is the past ->

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5082105
(fixed in 1.5.0_01)
(There are many other bugs in the database as well for even older 1.5 JVMs concerning InetAddress.isReachable() )

Could concievably some other resource is leaking as well.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!