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.





rnicholusAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Start by looking in the firewall log(s) concerned in B->C
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TrigunaCommented:
Did you check disabling your firewall?
I think its the problem with connection timed out. Meaning the connection is not yet reached the destination. Disable your firewall and check if this solves your problem.
If that is the case then you have to write a proxy for your machine which has firewall.

Let me know if this helps.
0
rnicholusAuthor Commented:
Yesterday we checked the logs and and checked the traffic was being blocked

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








0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.