aspose file tools*
The moose likes Distributed Java and the fly likes Strange problem in RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Strange problem in RMI" Watch "Strange problem in RMI" New topic
Author

Strange problem in RMI

Xin Wu
Greenhorn

Joined: Feb 20, 2004
Posts: 1
Hi,
I meet a strange problem in RMI. My RMI program doesn't work since the server's IP has been changed. The server is never restarted after that change for some reason. Now, I shut down rmiregistry and rebind the remote
object using the new IP. But when I use the new IP on client side, the connection to the server are refused. The strange thing is that: it prompts
it can not connect to the OLD IP address. Here is the information:
------------------------------------------------
D:\test>java -cp d:\test FileClient Server lex0.s 162.105.78.49
Find the server's object! The mode is :Server
Start to download lex0.s from 162.105.78.49 !
FileClient : Connection refused to host: 162.105.78.211; nested exception is:
java.net.ConnectException: Connection refused: connect
java.rmi.ConnectException: Connection refused to host: 162.105.78.211; nested ex
ception is:
java.net.ConnectException: Connection refused: connect
----------------------------------------------------------------
server's new IP is 49 and the old one is 211.
I have rebind the server side to new IP : 49
where does it get the old information?
I use ifconfig in my linux server and it also shows the new IP.
Who can help me? Thanks!
Chris Shepherd
Ranch Hand

Joined: Jun 27, 2000
Posts: 286
its bound to be in there somewhere. Did you cahnge both the binding in the server side and the lookup in the client? Do you have a way of searching your entire code for that IP? are you doing a dynamic call to collect the new IP or is it hardcoded? Did you remember to recompile your new code once you changed it? put in println checks at all places where you use the ip to see if you can find where the incorrect IP gets introduced.
Try some of these and se if anything helps.
Chris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange problem in RMI
 
Similar Threads
OpenJMS on multiple machines
Java RMI Connection Problem
RMI * java.net.ConnectException * occurs when client on remote computer
RemoteException in B&S
java.rmi.ConnectException: Connection refused to host