6 Replies Latest reply on Nov 25, 2009 9:14 AM by mbalazs

    JBoss Profiler snapshot doesn't work

      I have tried using jboss-profiler-2.0.Beta2 and jboss-profiler-2.0.Beta3.SP1 on my machine having jdk 1.6.0_07 installed.

      I am attempting to profile an ear application deployed on JBoss v4.2.3.ga.

      Now when I try to take snapshot using the command java -jar jboss-profiler-client.jar snapshot, the command prompt never returns.

      I have all the steps mentioned in readme available with the distribution. In run.conf, I have specified JAVA_OPTS="-javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties $JAVA_OPTS"

      I can view the jboss-profiler mbean using jmx-console.

      Can anyone suggest, why am I not able to take snapshots using JBoss profiler.

        • 1. Re: JBoss Profiler snapshot doesn't work
          jesper.pedersen

           


          Now when I try to take snapshot using the command java -jar jboss-profiler-client.jar snapshot, the command prompt never returns.

          The snapshot command can take a while to complete - also try to increase the heap size for the VM using -Xmx1024m.

          It sounds like you are doing it the right way.

          You may want to try the Save command followed by the GetSnapshot command instead.

          Otherwise post your full config here together with the commands executed.

          • 2. Re: JBoss Profiler snapshot doesn't work

            Hi jesper,

            I tried running the jboss-profiler-client.jar on a remote machine ( different from where JBoss AS is running) by executing the following command

            java -Xmx1024m -jar jboss-profiler-client.jar -h <IP Address> -p 5400 snapshot

            Still the command prompt hangs (waited for around 30 minutes).

            Even using listSnapshots doesn't display any output. jboss-profiler.properties copied to <JBOSS_HOME>/bin is provided below:

            enable=yes
            cpu=yes
            memory=yes
            includes=com.test.*
            excludes=*
            visibility=private
            save=yes
            startup=yes
            repository=no
            remote=yes
            store=memory
            location=.
            host=localhost
            port=5400
            ejb=yes
            servlet=yes
            jsf=yes
            jmx=yes
            rmi=yes
            corba=yes
            plugin.1=org.jboss.profiler.plugins.Hibernate


            • 3. Re: JBoss Profiler snapshot doesn't work
              jesper.pedersen

              Does startProfiler and stopProfiler return ?

              The save=yes + startup=yes option should provide you with a .jps file after the AS has been halted - probably in the bin/ directory.

              There are some fixes in the SVN repository - so you can try that if you want.

              • 4. Re: JBoss Profiler snapshot doesn't work

                I now tried with a package that has few classes and it worked. I am able to take snapshots.

                Is there a GUI available with jboss-profiler-2.0.Beta2 to view the snapshots?

                • 5. Re: JBoss Profiler snapshot doesn't work
                  jesper.pedersen

                  I have released 2.0 Beta4 which will generate the reports in HTML.

                  We don't have a web ui for the 2.0 branch yet - but we are working on it.

                  • 6. Re: JBoss Profiler snapshot doesn't work
                    mbalazs

                    If stopProfiler or snapshot doesn't return, try to set "jsf=no" in jboss-profiler.properties.

                    I had this problem, and eventually I've found out that the jsf profiler tryes to validate XML documents at some point during the stopProfiler call, and it needs to access external web sites to do so. Our firewall was blocking outgoing requests, so all XML validation attempts had to wait until the connection timed out.