Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8254157

InetAddress isReachable returns false for reachable known host

    XMLWordPrintable

    Details

      Description

      InetAddress isReachable fails with jdk7u but passes with jdk8u.

      Sample Program:

      import java.net.InetAddress;

      public class Test {
      public static void main(String[] args) {
      try {
                  final InetAddress addr = InetAddress.getByName("hostname");
                  final boolean isReachable = addr.isReachable(2000);
                  if (!isReachable) {
                      System.out.println("Not Reachable");
                  } else {
                      System.out.println("Reachable");
                  }
      } catch (Exception e) {
                  e.printStackTrace();
      }
      }
      }

      Excepted: Reachable
      Actual: Not Reachable

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kravikumar Kiran Sidhartha Ravikumar (Inactive)
              Reporter:
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: