-
1. Re: Running JBoss on dynamic IP address?
jkytang Sep 14, 2005 5:07 AM (in response to jkytang)I setup a DNS server and it works perfectly.
But the client still connects to the old ip address for port 1098!!
For example, my hostname is serverA.domain.com
The test procedure:
1. I run the server using: ./run.sh -b serverA.domain.com
2. After server starts up. Ip changed. (e.g. from 111.111.111.111 to 222.222.222.222)
3. I use "nslookup -sil serverA.domain.com" on both my server and client to check if the ip is valid. Both shows 222.222.222.222
4. I run EJB client.
5. On client, netstat -n shows the following:
222.222.222.222:1099 CLOSE_WAIT
111.111.111.111:1098 SYN_SENT
JBoss returns the old IP address to the client not the hostname.
I thought JBoss would bind itself to the hostname only and not the IP address. It seems that it's not.
I'm very frustrated...
Please help me. Thanks a lot. -
2. Re: Running JBoss on dynamic IP address?
jkytang Sep 19, 2005 9:32 PM (in response to jkytang)I found out the problem.
The rmi stub returned from Jboss is initialized and cached when server is started. (in org.jnp.server.Main.java). Therefore whenever my IP changes later on the server doesn't return the correct stub bound to the new IP address but instead returns the old stub.
So I think I have to modify the source code to get around with this problem.