2 Replies Latest reply on Sep 19, 2005 9:32 PM by Joseph Tang

    Running JBoss on dynamic IP address?

    Joseph Tang Newbie

      Hi I'm new to Jboss

      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. 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.

      What would you suggest to solve the problem?

      Thanks in advanced!


        • 1. Re: Running JBoss on dynamic IP address?
          Joseph Tang Newbie

          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 to
          3. I use "nslookup -sil serverA.domain.com" on both my server and client to check if the ip is valid. Both shows
          4. I run EJB client.
          5. On client, netstat -n shows the following:

          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?
            Joseph Tang Newbie

            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.