I just tested my application both in windows and linux machine.
I found a weired issue with my application(testing client running in remote mode):
(1)if I run my server in windows machine, client in linux machine. everything is fine. Client got connected, I could book/unbook etc. (2)if I run my server in linux machine, client run in window machine, my client GUI couldn't connect to server, and I got the following exception:
"172.30.16.225" is my linux box IP.
My RMI registry look up I use this:
Just not understand why application only work fine one way. Window couldn't look up that registry in linux box. But linux box actually get locate the registry in window box. Does anyone ever encounter this problem?
Add logging in the server, see what that does. You may have a problem in your serverside network configuration (outside your server or client code). Many Linux machines for example have their hosts file set up to incorrectly define the loopback interface, causing the server to send back an incorrect ip address for the stub to the client, with the result that the stub can't talk to the server after being returned from it.
I encounter a similar problem, but in my case the linux machine has a firewall. A very restrictive one, I just switch it off and it works.
SCJP, SCJD, SCWCD, OCPJBCD
Joined: Dec 15, 2005
Hi Jeroen, It seems you are right. My linux box firewall was disabled. my client side sometimes catch exception like:
regardless I passed in my correct server IP address on code:
But how can I fixed that network configuration on linux box? Do you have any idea where those host files sitting on in linux? Or maybe I could just ignore it as it seems it is the machine configuration problem as my codes works fine for the case of (client in linux, server in windows). Just scared that may lead to auto failure if accessor happen to encountered such an issue like this.
Jeroen T Wenting
Joined: Apr 21, 2006
It's most likely in /etc If 127.0.0.1 is mapped to more than just localhost remove every other entry it had for that address. I think that's enough, though you might have to remove the entire line for 127.0.0.1.
It's not about multiplatform testing but testing the scenario where the server runs on a different machine from the client. You do want them to talk together in that scenario and in this case the machine on which the server runs is configured incorrectly.
Some people are here to learn something...
subject: Help on locate RMI registry in linux and window