简体   繁体   中英

remote lookup on a remote client in Java RMI

As long as I run multiple clients on my local host everything works just fine. Problems arise when I start a client on a different host.

For instance, at some point during execution methods on the server are invoked with localhost as the destination, meaning that the server suddenly forgets about the remote client's IP address. How is that possible?

Also, remote lookup performed by the server takes forever to complete. Could it be my router denying access to it? Or is the server desperately trying to use different paths to get to the remote host?

Servers don't need to perform remote lookups. Clients do that.

If your clients are throwing ConnectExceptions indicating they are trying to connect to 'localhost' when they shouldn't be, see item A.1 of the RMI FAQ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM