This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am at final stage for submission of old FBN assignment. I am testing on Linux and Windows 2000. Case 1: RMI Server is running on Window 2000 and Client is running on Linux. I am able to connect. Case 2: RMI Server is running on Linux and Client is running on Window 2000 . When I try to connect to RMI Server, I get the error message java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested excepti on is: java.net.ConnectException: Connection refused:
I have added the ip address of the linux machine in /etc/hosts file.
I did netstat -an after starting the RMI server, it shows that RMI service is running on 1099.
Hi Akash, You did restart your server after changing the /etc/hosts file didn't you? I am suspicious that it is trying to connect to IP address 127.0.0.1 - are you sure you entered the correct address on the client side? When you ran the server on Windows and the client on Linux, you didn't accidentally have a server running on Linux at the same time did you? Regards, Andrew
Still not able to connect. I looked into all your suggestions. I have no firewall on Linux machine. I can telnet to linux machine. I do not have any connection problem. But still i am not able to connect to RMI server on Linux from windows 2000. I have a question. In my current client code to get the ref of remote object, i have
Case 2: RMI Server is running on Linux and Client is running on Window 2000 . When I try to connect to RMI Server, I get the error message java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested excepti on is: java.net.ConnectException: Connection refused: It seems Client is trying to find server on localhost, please check client lookup properties DNS name value ?? it might help Kmadan
Joined: Aug 21, 2003
Thanks Andrew and Kmadan. Finaly, I got through the problem. Actually solution to this problem java.rmi.server.hostname property. As of JDK 1.3.1 this property is set to localhost, and my localhost is 127.0.0.1 on linux and actual ip address is 22.214.171.124, name is Akash in /etc/hosts file. Therfore, Windows 2000 client was always trying to connect to 127.0.0.1 on linux. I think this is a problem on Linux. When i started started RMI server on Linux as: java -Djava.rmi.server.hostname=Akash -jar DataServer-with-DataServerUI.jar I was able to connect to RMI server on Linux from windows 2000 RMI client.
Thanks again to you guys. Regards, Akash
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com