Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invoke EJB on a remote machine with dynamic IP

 
Joseph
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I'm new to Jboss
And I have spent days trying to solve this. Please help me!

I would like to configure JBoss 4.0.2 on Redhat linux 9. And I need to call remote EJBs from another PC across the internet.
It works fine when I modify /etc/hosts so that my hostname can be resolved to a valid IP address.

i.e.
127.0.0.1 localhost.localdomain localhost
xxx.xxx.xxx.xxx myHost.localdomain

where xxx.xxx.xxx.xxx is my valid IP

However my ISP often changes my IP address.

First I started jboss under IP address xxx.xxx.xxx.xxx (/etc/hosts contains xxx.xxx.xxx.xxx)
Now if my ip changes from xxx.xxx.xxx.xxx to yyy.yyy.yyy.yyy,
Then I run my client to remotely invoke EJB with the following settings:


I'll get





If I change /etc/hosts's ip to yyy.yyy.yyy.yyy now, I still get the same error.

Does anyone know how to modify the rmi address when jboss is running? Or is there any other ways to get around the problem?

Thank you very much

Joseph
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you should use dns names instead of IPs, if they are changing.
Furtermore, you should make sure to use the jboss.bind.address.
This address (or dns name) will be used by all stubs bound in the
naming service.
 
Joseph
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marco, I got it now! Thanks a lot for your reply
[ September 04, 2005: Message edited by: Joseph ]
 
Joseph
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
Are there any JBoss experts here? Please help me. Thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic