3 Replies Latest reply on Oct 28, 2015 10:12 AM by gcalzada

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

    jayanthp

      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.

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

          I additionally went into the jmx console and checked out the Communicator MBean and it has the following configuration -

           

          Host localhost

          Socket true

          SocketPort 5400

          Rmi false

          RmiPort 5401

          Http false

          HttpPort 5402

           

          As per this post http://community.jboss.org/thread/105193?tstart=100 the above settings are correct to avoid the above error but i am still getting this exception. Any suggestions?

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

            I used to start the jboss by typing runbat -b 0.0.0.0 on the command Line.

            looking at the server.log during startup i noticed the following:

            16:25:24,781 INFO  [Communicator] JBoss Profiler: Socket=0.0.0.0:5400

             

            Assumign this does not look right and looking at another post (do not have the link here),

            i started the jboss by typing run.bat -b aaa.bbb.ccc.ddd where aaa.bbb.ccc.ddd = my  IPv4 internet address #

             

            looking at the start traces, i noticed the follwing:

            17:18:09,179 INFO  [Profiler] JBoss Profiler: ProfilerMBean started

            17:18:09,181 INFO  [Communicator] JBoss Profiler: Communicator for JBoss Profiler 2.0.0.Beta5

            17:18:09,195 INFO  [Communicator] JBoss Profiler: Socket=aaa.bbb.ccc.ddd:5400

             

             

            I expected thsi to work as i thought lookign above the socket is established connection at port 5400 at my internet address.

             

            However i still get the same Problem Establishing Socket Connection exception  on executing from another cmd window

             

            java -Xmx512m -jar C:/jboss-profiler-2.0.0.Beta5/jboss-profiler-client.jar startProfiler

             

            Can somebody please help?

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

              This is a really old thread but a headache for me in 2015!

               

              The package "jboss-profiler-2.0.0.Beta5.tar.gz" come with file "jboss-profiler-client.properties" with client connection properties:

               

              # cat jboss-profiler-client.properties

              protocol=socket

              host=localhost

              port=5400

              threshold=1.0

              savelocation=.

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

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

               

              You must change "localhost" by "youripaddress" (or by wherever the profiler is listening to)

               

              I share.

              Hope to be helpfull.