12 Replies Latest reply on Nov 28, 2011 1:58 PM by robertobeeman

    Not starting with standard Sun JMX options

    robertobeeman

      Hi,

       

         I am trying to start JBoss "jboss-as-7.1.0.Beta1" with the following JAVA_OPTS and the JBoss is not coming up:

       

      ./standalone.sh -c standalone-full.xml

      =========================================================================

          JBoss Bootstrap Environment

          JBOSS_HOME: /home/roberto/jboss-as-7.1.0.Beta1

          JAVA: /home/roberto/jdk1.6.0_21/bin/java

       

        JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=4545 -Dcom.sun.management.jmxremote.authenticate=false

       

       

      =========================================================================

        WARNING: Failed to load the specified logmodule org.jboss.logmanager:main

      Exception in thread "main" java.lang.ExceptionInInitializerError

                at org.jboss.as.server.Main.main(Main.java:90)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.modules.Module.run(Module.java:243)

                at org.jboss.modules.Main.main(Main.java:313)

      Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")

                at org.jboss.logmanager.Logger.getLogger(Logger.java:60)

                at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)

                ... 7 more

       

       

      If i remove the JAVA_OPTS which are high lighted above then everything works fine.

        • 1. Re: Not starting with standard Sun JMX options
          dmlloyd

          Using JMX RMI to manage the AS is not supported for a variety of reasons.  We anticipate providing a different remote JSR-160 connection mechanism for 7.1.0.Final however.

          1 of 1 people found this helpful
          • 2. Re: Not starting with standard Sun JMX options
            jason.greene

            David Lloyd wrote:

             

            Using JMX RMI to manage the AS is not supported for a variety of reasons.  We anticipate providing a different remote JSR-160 connection mechanism for 7.1.0.Final however.

             

            In the meantime you can enabled it in the beta by changing your standalone.xml to add one additional line to the jmx subsystem like so:

             

                  <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
                        <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
                   </subsystem>
            
            
            • 3. Re: Not starting with standard Sun JMX options
              robertobeeman

              Hi David,

               

                  Thank you for your quick update.   But i am not sure how to use JSR-160 connection mechanism. Do you have any link or example which i can use in this case.

               

              I also see a JIRA related to this isue:  https://issues.jboss.org/browse/AS7-1   which says that it should have been fixed in 7.0.0.Alpha1

               

              Thanks

              Roberto

              • 4. Re: Not starting with standard Sun JMX options
                jason.greene

                Jason Greene wrote

                In the meantime you can enabled it in the beta by changing your standalone.xml to add one additional line to the jmx subsystem like so:

                 

                 

                Note that doing so is an unsecure option, and other users on your system will have the ability to execute any JMX operation, up to and including executing arbitrary code.

                • 5. Re: Not starting with standard Sun JMX options
                  jason.greene

                  Jason Greene wrote:

                   

                  Jason Greene wrote

                  In the meantime you can enabled it in the beta by changing your standalone.xml to add one additional line to the jmx subsystem like so:

                   

                   

                  Note that doing so is an unsecure option, and other users on your system will have the ability to execute any JMX operation, up to and including executing arbitrary code.

                  Also if you are on the local system, you can still use the direct process attach feature of JMX console (and other tools that support it). This will work regardless

                  1 of 1 people found this helpful
                  • 6. Re: Not starting with standard Sun JMX options
                    robertobeeman

                    Hi Jason,

                     

                                Basically i needed a standalone Java aplication Remotely to query some of the JVM MBeans on which the JBoss is running. Is it not possible.

                    • 7. Re: Not starting with standard Sun JMX options
                      dlofthouse

                      We need to implement the mechanism itself first, then we will be able to provide some guidance as to how to use it.

                      • 8. Re: Not starting with standard Sun JMX options
                        jason.greene

                        Roberto Beeman wrote:

                         

                        Hi Jason,

                         

                                    Basically i needed a standalone Java aplication Remotely to query some of the JVM MBeans on which the JBoss is running. Is it not possible.

                        Ok then you can edit the standalone.xml as described above to enable it, but bear in mind that there is no security on that port, so whoever can see it can do anything they want to your system.

                         

                        We are going to provide a jboss-remoting based JSR-160 implementation by 7.1 final that will allow you to do the same thing, but it will use a secure authtentication mechanism that is consistent with our other protocols. You will have to add a couple jars to your client though.

                        • 9. Re: Not starting with standard Sun JMX options
                          robertobeeman

                          Hi Jason,

                           

                             If   i dont add the following snippet on my "standalone-full.xml" file  then i see all the MBeans inside the JConsole ... inclusing JBoss MBeans and JVM MBeans.

                           

                                <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
                                      <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
                                </subsystem>

                           

                           

                             With the above configuration my JConsole is not showing me the following MBeans "jboss.jta", "jboss.modules", "jboss.ws" and "jboss.msc"    is this normal or i have done something wrong?

                          • 10. Re: Not starting with standard Sun JMX options
                            jason.greene

                            Roberto Beeman wrote:

                             

                               With the above configuration my JConsole is not showing me the following MBeans "jboss.jta", "jboss.modules", "jboss.ws" and "jboss.msc"    is this normal or i have done something wrong?

                            Any chance you picked the wrong port?

                             

                            localhost:1090 is the default

                            • 11. Re: Not starting with standard Sun JMX options
                              robertobeeman

                              HI Jason,

                               

                                         As the JConsole is automatically detecting the Local JBoss process so i am not passing and URL in the following format:

                               

                              service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi

                               

                                        But if i try to connect to JBoss using the Above URL in JConsole then Connection never gets established.

                              • 12. Re: Not starting with standard Sun JMX options
                                robertobeeman

                                Hi Jason,

                                 

                                    I am able to connect to JBoss using JConsole now...i made a silly mistake earlier.

                                 

                                   Thank you ....for all your help

                                    Thank you David.