• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Strange problem in RMI

 
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!
 
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
 
The only thing that kept the leeches off of me was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic