3 Replies Latest reply on Nov 7, 2003 9:02 AM by noel.rocher

    connection refused

    noel.rocher

      Hi,

      1) my server config:
      JBoss 3.2.1
      linux mandrake 9.1 enterprise (kernel 2.4.21smp)
      sub jdk 1.4.2-b28

      2) firewall
      allow 80 8080 443 8443 1099 4444 <--- (is this latter useful for rmi ?)

      3) my computer w2k jdk1.4.2 with jboss 3.2.1 and a web application that will invoke Stateless EJB from the server described in 1).

      4) I've read the topic http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= it is recommended to check the /etc/hosts file. In my case it is OK.


      ===> the webapp in my computer still have the connection refused exception :

      15:00:31,312 ERROR [STDERR] javax.naming.CommunicationException. Root exception is
      15:00:31,312 ERROR [STDERR] java.rmi.ConnectException: Connection refused to host: 192.254.55.8 it's a fake address but is correct in the original message; nested exception is:
      java.net.ConnectException: Connection refused: connect
      15:00:31,312 ERROR [STDERR] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
      15:00:31,312 ERROR [STDERR] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
      15:00:31,312 ERROR [STDERR] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      15:00:31,312 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      15:00:31,312 ERROR [STDERR] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      15:00:31,312 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      ...

      Any clue ?

      Noel

        • 1. Re: connection refused
          noel.rocher

          OK, without the firewall it works.

          Is there anybody who knows which protocols I've forgotten to allow in my firewall conf ?

          Tx
          Noel

          • 2. Re: connection refused
            jonlee

            Difficult to say. Should only be 1099 for the naming lookup failure. However, it may be more likely that the connection is just being blocked. Test by telnet host 1099 from your remote machine and see if you get anything from the NamingServer.

            Assuming an iptables configuration you may want to look at exactly what the iptable script is doing.

            • 3. Re: connection refused
              noel.rocher

              Good news,

              first, thanks for your reply jonlee.

              Here is the result of my investigations:

              In 3.2.2, rmi port is set by the conf/jboss-service.xml in the JNDI part (see attribute RmiPort) to 1098.

              In 3.2.1 this is arbitrary decided at launch by default. If you place the attribute as in 3.2.2, it works !

              Noel