The issue here is that the RMI registy is checking that the client's hostname
matches the local hostname on bind() and rebind() calls. In addition the 
IP addresses are checked for a match. 

The logic is:

        InetAddress localhost = InetAddress.getLocalHost();

        Class class = Class.forName(new 
StringBuffer(String.valueOf(RemoteRef.packagePrefix)).append(".UnicastServerRef").toString());
        ServerRef serverRef = (ServerRef)class.newInstance();
        String clienthost = serverRef.getClientHost();

        InetAddress inetAddress = InetAddress.getByName(clienthost);
        if (!inetAddress.equals(localhost) && 
!clienthost.equals(localhost.getHostName()))
          throw new AccessException(string1 + " " + inetAddress + " != " + localhost);

So if the hostname *and* the IP address don't match, an exception is thrown.

A way to test what's going on here would be to write your own simple RMI
service and see what the various values of localhost, clienthost, and their
various 'getHostName()' and 'getByName()' values are. 

mdw

Reply via email to