10 Replies Latest reply on Apr 18, 2013 8:41 AM by softmahi

    Can't connect jConsole to the latest AS7 in the domain mode

    maksymg

      Hi,

       

      I followed this https://community.jboss.org/wiki/UsingJconsoleToConnectToJMXOnAS7 without any luck. Steps:

      • download the latest AS7 night build
      • JAVA_HOME is set properly
      • uncomment "<remoting-connector use-management-endpoint="false"/>" across all profiles in domain.xml
      • launch domain.bat
      • launch Jboss's jconsole.bat locally
        • can connect successfully to all sample jboss instances via Local (PID)
        • Console freezes on trying to connect with service:jmx:remoting-jmx://localhost:4447 or service:jmx:remoting-jmx://127.0.0.1:4447 (user/pass are empty)

       

      Am I missing something or Is it broken right now? I have no problem to connect ethier way to standalone mode (service:jmx:remoting-jmx://localhost:9999)

       

       

      Thanks,

      Maksym

        • 1. Re: Can't connect jConsole to the latest AS7 in the domain mode
          maksymg

          Hi,

           

          In domain mode I still can connect JBoss jconsole to service:jmx:remoting-jmx://<as7node>:9999, but it connects me to the local Host Controller not the application server instance I'm interested in. Since JBoss console loads CLI GUI as well besides standard jconsole tabs, could it be a cause of freezing since there is no management piece on port 4447?

           

          Thanks,

          Maksym

          • 2. Re: Can't connect jConsole to the latest AS7 in the domain mode
            ssilvert

            Darran Lofthouse was working on a solution that lets jconsole proxy through the domain controller and manage the instances in the domain.  I don't remember how far he got with it.

             

            It's easy to test if CLI GUI is the cause of your problem.  Just go into jconsole.bat and rem out this line:

            call :SearchForJars %JBOSS_MODULEPATH%\org\jboss\as\cli\main

             

            That way, jconsole will never find the CLI GUI plugin.  If CLI GUI is the problem then please let me know.

             

            Stan

            • 3. Re: Can't connect jConsole to the latest AS7 in the domain mode
              ctomc

              hi,

               

              by default management interfaces are only listening on 127.0.0.1 which means they cannot be accessed from remote server.

              can you try configurting managment interface to listen on public address (you can verify that by connecting to admin console)

               

              --
              Tomaz

              • 4. Re: Can't connect jConsole to the latest AS7 in the domain mode
                dlofthouse

                In doman mode the management interface isn't used for JMX access to the actual instances, as Stan mentions I am currently working on something to allow the host controller process to proxy the requests to the AS instances instead of requiring a direct connection to the AS process - I will be proposing this to the team fairly soon.

                • 5. Re: Can't connect jConsole to the latest AS7 in the domain mode
                  maksymg

                  Stan,

                   

                  Your suggestion works. After patching jconsole.bat, I'm able to connect to any remote/local JBoss domain instances for monitoring Java health. That's sufficient enough until JMX proxy mentioned by Darran will be in place.

                   

                  Thanks everyone

                  • 6. Re: Can't connect jConsole to the latest AS7 in the domain mode
                    ssilvert

                    Maksym Gryevtsov wrote:

                     

                    Stan,

                     

                    Your suggestion works. After patching jconsole.bat, I'm able to connect to any remote/local JBoss domain instances for monitoring Java health. That's sufficient enough until JMX proxy mentioned by Darran will be in place.

                     

                    Thanks everyone

                    So just to be clear, disabling CLI GUI was the full solution?

                     

                    Once Darran's work is in place, we won't need that workaround any more.  But I should still fix it anyway in case someone is trying to connect to instances directly.

                     

                    Stan

                    • 7. Re: Can't connect jConsole to the latest AS7 in the domain mode
                      maksymg

                      Yes

                       

                      I simply removed

                      call :SearchForJars %JBOSS_MODULEPATH%\org\jboss\as\cli\main

                       

                      It works for both 7.2.0 & 7.1.3

                      • 8. Re: Can't connect jConsole to the latest AS7 in the domain mode
                        ssilvert

                        Hi Maksym,

                         

                        I haven't been able to recreate this on my end.  What JVM are you using?

                         

                        Stan

                        • 9. Re: Can't connect jConsole to the latest AS7 in the domain mode
                          maksymg

                          Tested on Win7 x64, latest build for 7.2 & 7.1, Oracle/Sun Java 1.7.0_05 & 1.7.0_04.

                          Domain configuration:

                          test enviroment - download JBoss 7.2.0, fix jconsole.bat; launch domain.bat; able to connect jconsole to the first server instance using service:jmx:remoting-jmx://localhost:4447

                          "prod" enviroment - JBoss 7.1.3, three VMs (Win2008R2 x64) (dc, node1, node2); can connect jconsole to node01 & node02 app servers from the dc using service:jmx:remoting-jmx://<node>:4447

                          • 10. Re: Can't connect jConsole to the latest AS7 in the domain mode
                            softmahi

                            Its Worked For me .

                            i done changes in jconsole.sh

                             

                            as : 

                             

                            for MODULE in $MODULES

                            do

                                for JAR in `cd "$JBOSS_MODULEPATH/system/layers/base/$MODULE/main/" && ls -1 *.jar | grep -v as-cli`   #(removing CLI GUI plugin)

                                do

                                    CLASSPATH="$CLASSPATH:$JBOSS_MODULEPATH/system/layers/base/$MODULE/main/$JAR"

                                done

                            done