4 Replies Latest reply on Apr 15, 2003 11:18 AM by adrian.brock

    Web Start Client times out during InitialContext.lookup()

    bdavies

      I'm a complete network moron who is having problems with people outside of my ISP's local network running a web start client hosted on my local PC.

      I'm running JBoss 3.0.6 on my home PC (WinXP) which is connected to the internet via cable modem. The ISP does some strange things in order for me to have a static IP address for the outside world. I have to set a special internal IP address (from here on referred to as <internal address>) in my network settings and that maps to my static external IP address (from here on referred to as <external address>). I have set up my web start client to use <external address>:1099 as its jndi url, but the client times out during the InitialContext.lookup() with a CommunicationException. Inside the exception it says Connection refused to host <internal address>. I have no idea how the client can know anything about the server machine's internal IP address unless the JNDI server (for some unknown reason) is transmitting this address back to the client for some low-level use. My client does both bean and jms lookups, and both receive this same error.

      Is this because some server-side processing checks its internal ip address and sends it to the client? If it is, how do I setup jboss to override this behavior and only report the IP address that i know the outside world can access it by? If I'm way off base here, does anyone know of a different root cause of this problem?

        • 1. Re: Web Start Client times out during InitialContext.lookup(

          RMI generally picks an ip address that
          is mapped to your host name.
          It then adds it to the object.
          Try using the java.rmi.server.hostname
          trick explained in the FAQ.
          Then figure out why RMI is choosing the wrong
          ip address from your host mapping.

          Regards,
          Adrian

          • 2. Re: Web Start Client times out during InitialContext.lookup(
            bdavies

            I honestly am a network admin moron. Just wanted to get that out in the open. I went into my c:\WINDOWS\system32\drivers\etc directory and found 3 different files that sounded like the hosts file referenced in the FAQ: hosts, hosts.ics, and lmhosts.sam. Which of these is the file i need to modify? Also, what should i name my external ip address in that file? Does it matter what I call it? Where should i be referencing this name i come up with for my external address in my code? I guess I just don't see where this all fits in together. I apologize for this slowness and very much appreciate any time you guys spend on trying to help out...

            • 3. Re: Web Start Client times out during InitialContext.lookup(
              bdavies

              Well, i added an entry for
              <external address> sphincter boy
              and added the option
              -Djava.rmi.server.hostname=sphincter boy
              to the run.bat that comes with jboss. Unfortunately, now I can't even run this on my local network! I get this error
              javax.naming.CommunicationException. Root exception is java.rmi.ConnectException: Connection refused to host: sphincterboy; nested exception is:
              java.net.ConnectException: Connection timed out: connect

              So how do I now set up my client to map sphincterboy to my server's ip? Is there a property or properties that can be set on the client that mimics the hosts entry on the server? It would need to be able to be set thru the web start environment to continue to let web start make sense as a delivery mechanism. Thanks again for your help.

              • 4. Re: Web Start Client times out during InitialContext.lookup(

                For the hostname trick to work,
                each network needs to map it to the
                correct ip address for that subnet.
                Either using dns or host table entries.

                Regards,
                Adrian