2 Replies Latest reply: Nov 4, 2011 6:47 PM by jayanth padmanabhan RSS

    Can not get connection to server. Problem establishing so  cket connection for InvokerLocator [socket://localhost:5400/]

    jayanth padmanabhan Newbie

      I have just begun using JBossProfiler and I am facing some problems in starting/ using the profiler. I am still trying to understand how i can use it.

      But for now the first issue i am having is as follows:

       

      I am using JBoss 4.2.2.GAon Windows platform

       

      I Installed Jboss Profiler 2.0 as per the steps mentioned in the users guide i.e.

      1) Copy jboss-profiler.jar to my Jboss/bin

      2) Copy jboss-profiler.properties to my Jboss/bin

      3) Copy jboss-profiler-plugins.jar to my Jboss/bin

      4) Edit run.bat in my jboss/bin to include JBoss Profiler in JAVA_OPTS as follows:

      -javaagent:C:/Jboss/bin/jboss-profiler.jar -Djboss-profiler.properties=C:/Jboss/bin/jboss-profiler.properties

      5) Copy jboss-profiler.sar to Jboss/server/default/deploy

       

      6) my jboss-profiler.properties are set up as follows:

       

      enable=yes

      precompiled=no

      cpu=yes

      memory=yes

      includes=com.myclasses.genx.om.*

      excludes=*

      visibility=private

      save=yes

      savelocation=C:\tmp\profiles

      startup=yes

      repository=yes

      remote=yes

      store=memory

      location=C:\tmp\profiles

      host=localhost

      port=5400

      ejb=yes

      servlet=yes

      jsf=yes

      jmx=yes

      rmi=yes

      corba=yes

      plugin.1=org.jboss.profiler.plugins.Hibernate

      plugin.2=org.jboss.profiler.plugins.Seam

       

      My setup ends here:

       

      My server starts up fine and at the beginning it also echos to the console:

       

      JBoss Profiler 2.0.0.Beta5 (Sun Microsystems Inc. 1.6.0_06

      JBoss Profiler depends on external communication module

       

      I open another Command Line and cd into my jboss-profiler-2.0.0.Beta5 directory and when i hit the command

      java -Xmx512m -jar jboss-profiler-client.jar startProfiler

       

      i get the following exception:

       

      2011-11-02 19:28:00,490 ERROR [org.jboss.profiler.client.cmd.Client] Can not get connection to serve

      r. Problem establishing socket connection for InvokerLocator [socket://localhost:5400/]

      org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing so

      cket connection for InvokerLocator [socket://localhost:5400/]

              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientI

      nvoker.java:579)

              at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)

              at org.jboss.remoting.Client.invoke(Client.java:1634)

              at org.jboss.remoting.Client.invoke(Client.java:548)

              at org.jboss.remoting.Client.invoke(Client.java:536)

              at org.jboss.profiler.client.cmd.Client.main(Client.java:281)

      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:192)

              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketCli

      entInvoker.java:827)

              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientI

      nvoker.java:569)

              ... 5 more

       

       

      Every example of installation i checked online i see the port is set up as 5400. And not one has documented this error. I do not see this mentioend in the  profiler user guide. Can anyone tell me why i am getting this error and how i can fix it.