-3

I have an RMI server and RMI client programs, when I execute RMI server on unix machine, and RMI client on Windows machine, I am getting

java.rmi.ConnectException: Connection refused to host: ; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)

at the client side. I am able to execute on server and client on windows system but the server on linux is not working.

I searched using google, but I am unable to find the reason and fix.

I would appreciate your help.

Thank you in advance!

vj2015
  • 31
  • 1
  • 5

1 Answers1

0

Referring the url java.rmi.ConnectException: Connection refused to host: 127.0.1.1; I added a line to /etc/hosts file and it works, but I am accessing the host using the IP address in my client program.

I did not understand why do we need to add a line to the /etc/hosts file.

Any comments. Thank You!.

Community
  • 1
  • 1
vj2015
  • 31
  • 1
  • 5