• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI connection to registry refused

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...)
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
reply
    Bookmark Topic Watch Topic
  • New Topic