RMI server error for client when client computer has more than one IP address

Firstly, I would like to post some real code for this question, but I cannot, because there are too many lines. However, here is my situation:

Server side

I have an RMI server that expects clients to connect and "register" on their own so that the Server can make function calls on the Clients. Basically, the server has a published function that works like the following pseudocode:

public class Server extends UnicastRemoteObject implements ServerInterface{
    public Server(){ /* Server publishes itself here */ }

    ...

    /** One of many methods visible to a remote Client */
    public void registerClient(Client c) throws RemoteException{
        //1. Make some remote calls on 'c' for book-keeping purposes
        //2. Store reference to c to make calls on it later
    }
}

Client side

At startup, the client makes a call Naming.lookup([url])to get a stub on the server that I will call serverRefand then call serverRef.registerClient(this). The problem is the first line of the server method registerClient(Client c).

Problem

Client registerClient, RemoteException. , IP-. , IP- :

IP- : 123.45.67.1
IP- : 123.45.67.2, 192.168.67.2

, , , Client 192.168.67.2, . 123.45.67.1. , , IP-, , .

"" RMI, IP- ?

+3

All Articles