Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > InetAddress.isReachable bugs or implmentation differeces in JRE1.5 vs JRE1.6

Reply
Thread Tools

InetAddress.isReachable bugs or implmentation differeces in JRE1.5 vs JRE1.6

 
 
sujit
Guest
Posts: n/a
 
      01-03-2011
Hi,

I am trying a very simple code.

InetAddress serverInetAddress = InetAddress.getByName(serverName);
svrAlive = serverInetAddress.isReachable(5000);

For some xyz server name same code returns me "true" (i..e. server is
rechable) when I use JRE1.6

However when I use IBM JRE supplied along with IBM websphere (It's on
top of JRE1.5) same code returns me exception like "IO Exception
java.net.SocketException: Permission denied: Can't send ICMP packet"

I have not tried this so far with JRE1.5 but I hope that I will get
same problem with that too.

Looking at sun website for isRechable bugs there seem to be lot of
known issues with isRechable but all those seem to be releated to
thread safety. But I could not find anything else.

Are there any known implementation changes (to address these kind of
issues) for InetAddress.isReachable in JRE1.6 vs JRE1.5

Could someone help?

Thanks,
-Sujit
 
Reply With Quote
 
 
 
 
Arne Vajh°j
Guest
Posts: n/a
 
      01-05-2011
On 03-01-2011 04:34, sujit wrote:
> I am trying a very simple code.
>
> InetAddress serverInetAddress = InetAddress.getByName(serverName);
> svrAlive = serverInetAddress.isReachable(5000);
>
> For some xyz server name same code returns me "true" (i..e. server is
> rechable) when I use JRE1.6
>
> However when I use IBM JRE supplied along with IBM websphere (It's on
> top of JRE1.5) same code returns me exception like "IO Exception
> java.net.SocketException: Permission denied: Can't send ICMP packet"
>
> I have not tried this so far with JRE1.5 but I hope that I will get
> same problem with that too.
>
> Looking at sun website for isRechable bugs there seem to be lot of
> known issues with isRechable but all those seem to be releated to
> thread safety. But I could not find anything else.
>
> Are there any known implementation changes (to address these kind of
> issues) for InetAddress.isReachable in JRE1.6 vs JRE1.5


I believe that what isReachable actually does is implementation
specific.

Some implementations does a ping, other try to make a TCP
connection to the Echo service.

You should not rely on it.

Try and do what you want to do and handle an exception.

Arne

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
the differeces among those three directories under ruby-1.8.5\lib\ruby: /1.8, /gems, and /site_ruby mixfocus Ruby 0 04-23-2007 01:34 AM
about jacob and jdk's corba implmentation david wolf Java 3 12-01-2006 05:24 PM
Putting implmentation in .h files? Plissken.s@gmail.com C++ 17 02-27-2006 01:45 AM
Bugs and Bugs...get rid of them Jason Computer Security 1 01-31-2006 10:47 PM
Java Software JSP/Servlets for Website Template implmentation Prateeksha Web Services Java 0 08-29-2003 07:53 AM



Advertisments