• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI connection to registry refused

 
Eileen Wilson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm having issues getting my rmi server to connect to the registry this the the code:



And this is the exception trace:



I do have a firewall running however I have switched it off and the exception remains the same.

I've tried each of the following: my own static IP address, localhost and 127.0.0.1

I'm starting the registry with the following .bat file




I'd appreciate any suggestions,
Many thanks
[ August 25, 2005: Message edited by: Eileen Wilson ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing wrong is jumping out at me from what you've posted so far...

Just to make sure, when you run your batch file - a new blank command prompt window pops up and stays up for rmiregistry, right?

Are you setting the "java.rmi.server.hostname" property on your server to see if this fixes the problem you are having, or have you always been setting it? I'd leave it off... I don't see a need to explicitly set it. You'd only need to set this property if you were trying to get around a NAT firewall or something - (as referred to in this post on Sun's forums...)
 
Sudha Rams
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I too agree with Nathan. I'm a newbie to RMI and I had a similar piece of code working okay.

Just a suggestion: Using localhost works fine only in the same physical host. I had to give the IP address when I executed the client from a different machine from that of the server.

I've given below the details of the batch files that I use:

Here is how I start the registry:



I start the RMI service like this:



I execute the RMI client like this:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic