14 Replies Latest reply on Oct 13, 2008 10:18 PM by sandy santos

    Problem Starting RMI service

    sandy santos Newbie

      Hi,

      I recently inherited a Jboss Application server version 4.03SP1 running on HP-UX and have been using twiddle.sh to get various information on Jboss.
      My problem is that twiddle is spewing out info errors that it could not connect to the remote jboss server running at port 1099. Looking at the runnning services at this server, using netstat -an I noticed that there is no jboss service bound to that port (1099). I am left to assume that the RMI service of jboss is not starting properly. Can you give me some points to look for why this service is not starting.

      twiddle log excerts:
      19:15:01,340 DEBUG [GetCommand] attribute names: [AvailableConnectionCount]
      19:15:01,411 DEBUG [NamingContext] Failed to connect to irisapp1:1099
      javax.naming.CommunicationException: Failed to connect to server irisapp1:1099 [ Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server irisapp1:1099 [Root exception is java.net.ConnectException: Connection r efused (errno:239)]]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle .java:235)
      at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:253)
      at org.jboss.console.twiddle.Twiddle.access$300(Twiddle.java:47)
      at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:124)
      at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(M BeanServerCommand.java:47)
      at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java: 137)
      at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:290)
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server irisapp1:1099 [Root exception is java.net.ConnectException: Connection refused (errno:239)]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
      ... 11 more


      note: no firewall or port limitation is currently set at port 1099.

      TIA.

      Sandy

        • 1. Re: Problem Starting RMI service
          sandy santos Newbie

          extra information:

          Hp-UX B.11.23 U

          We have another Jboss App server running on Linux and RMI service at port 1099 is running fine.

          Any help would be highly appreciated.

          • 2. Re: Problem Starting RMI service
            André castanheira Newbie

            Sandyts,

            What commands do you use in order to get information from Jboss server?

            Tahnks,
            Andre

            • 3. Re: Problem Starting RMI service
              Peter Johnson Master

              Most likely someone changed the port to which JNDI is bound. Look in the server/xxx/conf/jboss-service.xml file, at the Port setting for the jboss:service=Naming mbean.

              • 4. Re: Problem Starting RMI service
                sandy santos Newbie

                Hi Andre,

                Here's my twiddle command

                /twiddle.sh -s irisweb2prd -Djnp.disableDiscovery -u xxxx -p xxxxx get jboss.jca:name=jdbc/SybaseDB,service=ManagedConnectionPool AvailableConnectionCount

                • 5. Re: Problem Starting RMI service
                  sandy santos Newbie

                  Hi Peter,

                  here's my jboss-service.xml config.

                  <!-- ==================================================================== -->
                  <!-- JNDI -->
                  <!-- ==================================================================== -->

                  <mbean code="org.jboss.naming.NamingService"
                  name="jboss:service=Naming"
                  xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
                  <!-- The call by value mode. true if all lookups are unmarshalled using
                  the caller's TCL, false if in VM lookups return the value by reference.
                  -->
                  false
                  <!-- The listening port for the bootstrap JNP service. Set this to -1
                  to run the NamingService without the JNP invoker listening port.
                  -->
                  1099
                  <!-- The bootstrap JNP server bind address. This also sets the default
                  RMI service bind address. Empty == all addresses
                  -->
                  ${jboss.bind.address}
                  <!-- The port of the RMI naming service, 0 == anonymous -->
                  1098
                  <!-- The RMI service bind address. Empty == all addresses
                  -->
                  ${jboss.bind.address}
                  <!-- The thread pool service used to control the bootstrap lookups -->
                  <depends optional-attribute-name="LookupPool"
                  proxy-type="attribute">jboss.system:service=ThreadPool


                  Do you think there's anything wrong with it?

                  • 6. Re: Problem Starting RMI service
                    Peter Johnson Master

                    I am guessing that port 1099 is still being used (it is hard to tell because you did not use the 'code' tag to format your xml text, and you did not first preview your response before posting it).

                    Your next task, then, is to find out of port 1099 is really open and if it is being blocked by a firewall. I would know where to tell you to look on Linux, but not on HPUX. See http://www.jboss.org/community/docs/DOC-9999 for some things to do to try to resolve the problem.

                    • 7. Re: Problem Starting RMI service
                      sandy santos Newbie

                      Hi Peter,

                      Thanks for the reply, I'm posting the tag directive using the code tag. Is this okay?


                      <!-- ==================================================================== -->
                       <!-- JNDI -->
                       <!-- ==================================================================== -->
                      
                       <mbean code="org.jboss.naming.NamingService"
                       name="jboss:service=Naming"
                       xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
                       <!-- The call by value mode. true if all lookups are unmarshalled using
                       the caller's TCL, false if in VM lookups return the value by reference.
                       -->
                       <attribute name="CallByValue">false</attribute>
                       <!-- The listening port for the bootstrap JNP service. Set this to -1
                       to run the NamingService without the JNP invoker listening port.
                       -->
                       <attribute name="Port">1099</attribute>
                       <!-- The bootstrap JNP server bind address. This also sets the default
                       RMI service bind address. Empty == all addresses
                       -->
                       <attribute name="BindAddress">${jboss.bind.address}</attribute>
                       <!-- The port of the RMI naming service, 0 == anonymous -->
                       <attribute name="RmiPort">1098</attribute>
                       <!-- The RMI service bind address. Empty == all addresses
                       -->
                       <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
                       <!-- The thread pool service used to control the bootstrap lookups -->
                       <depends optional-attribute-name="LookupPool"
                       proxy-type="attribute">jboss.system:service=ThreadPool</depends>
                       </mbean>
                      
                       <mbean code="org.jboss.naming.JNDIView"
                       name="jboss:service=JNDIView"
                       xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">
                       </mbean>
                      
                       <!-- ==================================================================== -->
                       <!-- Security -->
                       <!-- ==================================================================== -->


                      I've checked all of my listening ports but could not find port 1099 as open . I have also ask our Net-security team to determine if the port is blocked but they said it's not.

                      Note: I used the netstat-an | grep 1099 command to find if the port is open.

                      • 8. Re: Problem Starting RMI service
                        jaikiran pai Master

                        What does the following output from your client machine?

                        telnet irisapp1 1099


                        • 9. Re: Problem Starting RMI service
                          sandy santos Newbie

                          hi,


                          I get "Unable to connect to Host error".

                          • 10. Re: Problem Starting RMI service
                            jaikiran pai Master

                            This means that the port on irisapp1 is not accessible from the client machine.

                            • 11. Re: Problem Starting RMI service
                              sandy santos Newbie

                              Hi J,

                              I'm leaning towards the conclusion that the service at port 1099 is not running. :-) Besides, even at the host itself, I get the same error.

                              • 12. Re: Problem Starting RMI service
                                jaikiran pai Master

                                Okay, let's try this. On your irisapp1 system where JBoss is running, access http://irisapp1:8080/jmx-console through a browser. If the http port is different, use the appropriate port. On the jmx-console, search for service=Naming and click on the link. On the page that comes up, search for the "Port" attribute and see what the corresponding value is. For me it's 1099. You will then have to use this port number from your client machine.

                                • 13. Re: Problem Starting RMI service
                                  sandy santos Newbie

                                  Hi,

                                  Great idea!

                                  I have found that we are using 1199 for Port and 1198 for rmiPort. I'm gonna try which one could I connect.

                                  I'll keep you posted. :-)

                                  • 14. Re: Problem Starting RMI service
                                    sandy santos Newbie

                                    Hi Jaikiran,

                                    It worked!

                                    I am now able to query the Jboss server using twiddle at port 1199. Thanks for the help.