5 Replies Latest reply on Apr 25, 2008 9:56 AM by vlaugier

    JConsole remote not  working with JBoss4.2.2GA

    kpandey

      I don't know if its related to this http://jira.jboss.com/jira/browse/JBAS-3947
      but I see the following issue while trying to connect JConsole (either jdk 5.x or 6.x) remotely to JBoss4.2.2GA

      Here's the server configuration in run.sh to use the platform Mbean

      JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
      JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
       JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=12345"
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"


      Here's the trace on JConsole


      Nov 12, 2007 6:09:40 PM RMIConnector connect
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] connecting...
      Nov 12, 2007 6:09:41 PM RMIConnector connect
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] finding stub...
      Nov 12, 2007 6:09:41 PM RMIConnector connect
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] connecting stub...
      Nov 12, 2007 6:09:41 PM RMIConnector connect
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] getting connection...
      Nov 12, 2007 6:09:42 PM RMIConnector connect
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] getting class loader...
      Nov 12, 2007 6:09:43 PM RMIConnector connect
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] failed to connect: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
       java.net.ConnectException: Connection refused: connect
      Nov 12, 2007 6:09:43 PM RMIConnector close
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] closing.
      Nov 12, 2007 6:09:43 PM ClientNotifForwarder terminate
      FINER: Terminating...
      Nov 12, 2007 6:09:43 PM RMIConnector close
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] RMI Notification client terminated.
      Nov 12, 2007 6:09:43 PM ClientCommunicatorAdmin Checker-run
      FINER: Finished.
      Nov 12, 2007 6:09:44 PM RMIConnector close
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] Failed to close RMIServer: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
       java.net.ConnectException: Connection refused: connect
      Nov 12, 2007 6:09:44 PM RMIConnector close
      FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[10.0.3.152:42167](remote),objID:[19c91f5a:116368d1bed:-8000, 6476555945438087490]]]]] failed to close: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
       java.net.ConnectException: Connection refused: connect
      


      Note that I am able to open the JConsole from the same box using localhost:12345

      Any tips on further troubleshooting would be greatly appreciated.

        • 1. Re: JConsole remote not  working with JBoss4.2.2GA
          gvnanil

          I need help here...

          I want to connect to the JBossESB's JMX Console from JConsole.

          What is the URL that I should be using to connect?

          My goal is to manage the ServerPeer MBean from JConsole

          • 2. Re: JConsole remote not  working with JBoss4.2.2GA
            kpandey

            gvnanil, since you're asking a new question and not answering the one I posted it would make sense to start a new thread on it. That would beneficial in two ways
            1) You have more chance of someone answering your specific question
            2) It would prevent others from wasting their time by drilling down on this topic only to realize that someone had posted a different question on this thread.

            • 3. Re: JConsole remote not  working with JBoss4.2.2GA
              kpandey

              ok found the issue.
              Its due to some host binding issue.

              I was binding the host like so -
              -Djboss.bind.address=xxx.xx.com

              and this didn't work.

              I changed it to -b xxx.xx.com and now its working like a charm

              • 4. Re: JConsole remote not  working with JBoss4.2.2GA
                axismundi

                kpandey, what exactly did you change?
                We are having trouble to connect to the JBoss JVM running on Linux. I investigated http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6209663
                but changes to /etc/hosts didn't help.

                I tried to set in run.conf
                JAVA_OPTS="$JAVA_OPTS -Djboss.bind.address=LOCALIP"
                and
                JAVA_OPTS="$JAVA_OPTS -Djboss.bind.address=HOSTNAME"

                but this didn't help either.


                • 5. Re: JConsole remote not  working with JBoss4.2.2GA
                  vlaugier

                  Hello all,

                  I have just found that there is a run.conf in JBOSS_HOME/bin

                  but also in JBOSS_HOME/server/production, JBOSS_HOME/serve/default, ...

                  I have not yet understand how the choice is made between then in JBOSS_HOME/bin/run.sh

                  # Read an optional running configuration file
                  if [ "x$RUN_CONF" = "x" ]; then

                  if [ ! -z "$JBOSSCONF" ] && [ -f "$DIRNAME/../server/$JBOSSCONF/run.conf" ]; then
                  RUN_CONF="$DIRNAME/../server/$JBOSSCONF/run.conf"
                  else
                  RUN_CONF="$DIRNAME/run.conf"
                  fi
                  fi
                  if [ -r "$RUN_CONF" ]; then
                  . "$RUN_CONF"
                  fi


                  It might help people like myself that could not understand why startup options were not taken into account

                  cheers

                  vincent