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

Windows 8 64bit + rmi: LocateRegistry.getRegistry() causes ConnectException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 7, 7u9
    • core-libs

      FULL PRODUCT VERSION :
      java version " 1.7.0_09 "
      Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
      Java HotSpot(TM) 64-Bit Server VM (built 23.5-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 8 Professional (64 bit)
      6.2.9200

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      using Kaspersky Internet Security 2013, but bug did also show up with Kaspersky disabled

      A DESCRIPTION OF THE PROBLEM :
       "
      LocateRegistry.createRegistry();
      Registry registry = LocateRegistry.getRegistry();
      registry.rebind( " String " , Object);
       "
      causes a ConnectException in Windows 8 only

      REGRESSION. Last worked in version 7

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run a simple RMI server on Windows 8.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      rmi server is working like it does in Windows 7.
      ACTUAL -
      rmi server crashes with a ConnectException

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.rmi.ConnectException: Connection refused to host: 192.168.178.48; nested exception is:
      java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.rmi.RemoteException;
      import java.rmi.registry.LocateRegistry;
      import java.rmi.registry.Registry;
      import java.rmi.server.RemoteServer;

      public class Server {

      public static void main(String[] args) {

      try{
      LocateRegistry.createRegistry(Registry.REGISTRY_PORT);

      String test = new String();

      Registry registry = LocateRegistry.getRegistry(Registry.REGISTRY_PORT);
      registry.rebind( " String " , test);

      }catch(RemoteException e){
      System.err.println(e);
      }

      }

      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      do not use windows 8

            smarks Stuart Marks
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: