rnicholus
asked on
Rmi Client - Connection refused to host: xx.xx.xxx.xx
I have 2 rmi servers that are running on 2 different machines (A and C).
The Client for these servers runs on the 3rd machine (B).
All machines have linux OS.
Machine A and B do not have a firewall between each other.
But there is a firewall between the A and C, also there is a firewall between B and C.
Firewall
^
Machine A | Machine C
(rmi server 1) | (rmi server 2)
|
|
Machine B |
(rmi client for 1 and 2) |
The Rmi client on machine B is successful in looking up the rmi server 1's remote interface in rmi registry on machine a which runs on port 2001 and calling the methods on it.
But, for the Machine C
1.) It takes 15-20 secs to look up the rmi object for the rmi server 2's remote interface from the rmi registry that runs on the port 2001.
2.) It gets "Connection refused to host xx.x.xxx.xx, connection timed out when calling a method on the remote object"
I am guessing it might be some permission issue. But do not know where to start. Could anyone guide me.
Any help is very much appreciated.
Thank you.
The Client for these servers runs on the 3rd machine (B).
All machines have linux OS.
Machine A and B do not have a firewall between each other.
But there is a firewall between the A and C, also there is a firewall between B and C.
Firewall
^
Machine A | Machine C
(rmi server 1) | (rmi server 2)
|
|
Machine B |
(rmi client for 1 and 2) |
The Rmi client on machine B is successful in looking up the rmi server 1's remote interface in rmi registry on machine a which runs on port 2001 and calling the methods on it.
But, for the Machine C
1.) It takes 15-20 secs to look up the rmi object for the rmi server 2's remote interface from the rmi registry that runs on the port 2001.
2.) It gets "Connection refused to host xx.x.xxx.xx, connection timed out when calling a method on the remote object"
I am guessing it might be some permission issue. But do not know where to start. Could anyone guide me.
Any help is very much appreciated.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can get more information about proxy programming in the following link.
http://today.java.net/pub/a/today/2004/06/01/RMI.html?page=2
http://articles.techrepublic.com.com/5100-10878_11-5101310.html
http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/server/UnicastRemoteObject.html
Let me know if it helped.
http://today.java.net/pub/a/today/2004/06/01/RMI.html?page=2
http://articles.techrepublic.com.com/5100-10878_11-5101310.html
http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/server/UnicastRemoteObject.html
Let me know if it helped.
ASKER
As Machine A and Machine C are inside our host company's firewall so disabling another firewall between C and B can work.
For the second option Triguna:
I have never written a proxy before. So I would like to try this option as well
Machine B and C have their own firewall and then there is a router firewall between these two
Does that mean the proxy needs to be written on both the machines?
Also could you give an example how would we lookup the rmi server's remote object using proxy