Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

RMI connection issue

Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to run an RMI application from the client side but i've not been successful at doing that. The general concept of RMI (distributed application) is that the server side of the application registers a server object with an RMI registry. This happened successfully with my server application. I'm testing the entire application on my local system for now i.e the server and client part all reside on the same computer. I'm connecting both ends of the application by opening two command prompt side by side with the RMI registry console in between them. Syntactically, there are no problems with the programs because both successfully compiled. Infact it's a basic RMI program in which the client program calls a sayHello() method and a greeting message is returned to the client. I have a feeling that the problem is more of external to the code itself i.e. IP referencing by the system an so on. I stuck to the default port of 1099. I followed the required steps (correctly) to get the application running but when it comes to running the client end to connect to the server, i kept receiving this same message. ConnectException.....refused to host:

i followed the directives/advice i got from other forums but the error persisted. The directive i followed include
1 referencing the rmi.server.hostname env variable when running the server program
2 editing the hosts folder under \etc folder to ensure that RMI registry is indeed sticking to the localhost

The same exception persisted. I'll appreciate if someone can assist with effective advice on the way out. The application is being run on windows 7. Both the server and client program are shown below:

The client program:

Olakunle Oni
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic