5 Replies Latest reply on Dec 12, 2001 8:42 AM by randy

    intro-interest example between machines?

    Ben Clarke Newbie

      Hi --

      We have JBoss 2.4.3 (binary download) installed and apparently running fine on a RH 7.1 (static ip) box. The intro-interest example runs properly on that machine locally. We are unable to connect to the Interest bean from another machine. The error is always:

      (Debug: Got context)
      javax.naming.CommunicationException [Root exception is
      java.rmi.ConnectException: Connection refused to host:; nested exception is: java.net.ConnectException: Connection refused: connect]

      The jndi.properties points at the correct host (if we intentionally break this we get the expected message). All pings work, we can telnet into 1099 on the jboss server, we can open a url in a jvm on the client machine to 1099 on the server -- everything *except* connect from the InterestClient. There are no NoClassDefFound errors obviously. We have duplicated this error on 3 configurations on 2 different machines (NT4 SP6 client with DHCP, Win98 DHCP, Win 98 static IP).

      It is hard to believe that we are the first ones to encounter this problem with a simple example across two machines. The test code in question is the intro-interest example, unmodified. If there are *any* suggestions at all on anything we might have missed some advice would be very greatly appreciated indeed.

        • 1. Re: intro-interest example between machines?
          randy Newbie

          Posted this in the JSP thread. my goal is to have tomcat/apache on one machine and JBoss on another.

          Here is how I got the interest app to work on a diff machine (both solaris)

          I got the Interest-client app to run on a different box, so I guess the procedure to run a jsp (thus tomcat) on a different server would be the same.

          I had to copy the contents of the JBOSS_DIST/client dir to an accessible location so I could build the client app (I still can't find the jar that contains the javax.rmi.PortableRemoteObject class, but this works). This allowed me to compile, but not run the app. The second thing was to tweek the resource file for the client (under examples/resource, called jndi.properties). I tweeked the java.naming.provider.url from localhost to my jboss server. Now this app runs on a seperate machine. I just got to figure out how to map this to a jsp container.

          • 2. Re: intro-interest example between machines?
            Ben Clarke Newbie

            Thanks for your suggestion, we have just figured out what was causing our problem. The documentation for JBoss 2.4.3 indicates that the file jboss.properties "currently contains no properties". As far as we can tell, what that actually means is that critical configuration parameters are commented out to default to "localhost". Upon uncommenting and changing these values (the first 3 in the file) our remote client worked first time. Our next question, I suppose, is this: If jboss.properties has no necessary configuration parameters, where are the ones we just changed to make it work supposed to be?

            • 3. Re: intro-interest example between machines?
              Manuel Elaraj Newbie

              The problem that you are encountering is classic. The issue is that the JNDI knows your server as "localhost". However, your client machines resolves localhost to its own address. Basically the client asks the JNDI for the location of the bean and JNDI tells the client that it is localhost. And so the client uses that address to get to the bean. Localhost to the client is its own address and therefore the call fails.

              All you have to do is go into the configuration file JBOSS_DIST\conf\default\jboss.properties and replace the word "localhost" to the IP address or the well known host name of the machine..

              Good luck,
              Manuel Elaraj

              • 4. Re: intro-interest example between machines?
                Manuel Elaraj Newbie

                oops. That is what happens when you don't read the other responses.

                Well I am glad the you figured it out.


                • 5. Re: intro-interest example between machines?
                  randy Newbie


                  I do that all the time. Your explaintation as to why this was needed was very useful, esp. to a newbie.