Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange problem in RMI

 
Xin Wu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic