2 Replies Latest reply on May 13, 2008 11:28 AM by Jesper Pedersen

    Problem in setting up JBoss Profiler 2 in Jboss 4.2.1

    Smita Patnaik Newbie

      Hi,

      I'm running or rather trying to run JBoss profiler version 2 in JBoss 4.2.1. I have followed the instructions in the README.txt , but cannot get it to work.

      My setup is as follows:
      - Windows XP machine
      - Downloaded Jboss Profiler 2 CR8
      - Copied jboss-profiler.jar to JBOSS_HOME/bin
      - Copied jboss-profiler.properties to JBOSS_HOME/bin
      - Copied jboss-profiler-plugins.jar to JBOSS_HOME/bin
      - Copied asm.jar to JBOSS_HOME/bin
      - Copied jboss-profiler.sar to JBOSS_HOME/server/default/deploy
      - Edited run.bat to include the following line:
      set JAVA_OPTS=%JAVA_OPTS% -javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties

      jboss-profiler.properties file has -

      enable=yes
      cpu=yes
      memory=yes
      includes=org.jboss.profiler.*
      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

      When I start up jboss, I have the following on console -

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

      JBoss Bootstrap Environment

      JBOSS_HOME: C:\jboss

      JAVA: C:\Java\bin\java

      JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

      CLASSPATH: C:\Java\lib\tools.jar;C:\jboss\bin\run.jar

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

      JBoss Profiler 2.0.CR8 (Sun Microsystems Inc. 1.5.0_12)
      JBoss Profiler depends on external communication module
      15:10:14,615 INFO [Server] Starting JBoss (MX MicroKernel)...
      .......

      The server boots smoothly.

      I have an enterprise application(Icefaces /EJBs/Jbpm workflow) ear deployed on the server which I want to profile.

      Now at the command prompt I say -
      java -jar jboss-profiler-client.jar startProfiler

      And I get the following exception -

      2008-04-17 15:40:25,299 ERROR [org.jboss.profiler.client.cmd.Client] Can not get
      connection to server. Problem establishing socket connection for InvokerLocator
      [socket://localhost:5400/]
      org.jboss.remoting.CannotConnectException: Can not get connection to server. Pro
      blem establishing socket connection for InvokerLocator [socket://localhost:5400/
      ]
      at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor
      t(MicroSocketClientInvoker.java:530)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI
      nvoker.java:122)
      at org.jboss.remoting.Client.invoke(Client.java:1550)
      at org.jboss.remoting.Client.invoke(Client.java:530)
      at org.jboss.remoting.Client.invoke(Client.java:518)
      at org.jboss.profiler.client.cmd.Client.main(Client.java:252)
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(
      SocketClientInvoker.java:187)
      at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConne
      ction(MicroSocketClientInvoker.java:801)
      at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor
      t(MicroSocketClientInvoker.java:526)
      ... 5 more

      I have 2 questions -

      1. While booting, the server log says 'JBoss Profiler depends on external communication module '
      Is there some other jar which I need to put somewhere?
      I tried putting the jboss-remoting.jar, concurrent.jar in JBOSS_HOME/bin. But it would throw other kinds of errors.

      2. I went into the jmx console and checked out the Communicator MBean
      and it has the following configuration -
      Host localhost
      Socket false
      SocketPort 5400
      Rmi false
      RmiPort 5401
      Http false
      HttpPort 5402

      It would throw RuntimeException when I try to enable Socket by setting to true. My guess is this being disabled, its not able to establish socket connection ! Is it so?

      I greatly appreciate any help. :)

      Thanks,
      Smita