Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yourkit UI throwing "There's no application running at localhost with profiler agent configured to listen on port" exception

I am trying to profile remote applications that are deployed within Jboss. So far I can connect to the remote server and see my applications, I am also able to connect to the applications. But when I click "Start CPU profiling", it takes really long time and most of the times results in the following exception:

There's no application running at localhost with profiler agent configured to listen on port 59462
or profiler agent is incompatible with current version of profiler

Although sometimes (rarely) it does start the profiling and give me the results what I want. But I am not able to understand this inconsistent behaviour and I also don't understand why does it give me an error saying "no application running on localhost ..." considering I am trying to profile a remote application.

Snippet from the machine where the UI is installed:

18.04-61 8341.339: com.yourkit.k.jm: LC@7fc6aab9{localhost:59131,pid=23651}: com.yourkit.b.bb: Bad stream from profiled application
Technical detail: EOF
   at com.yourkit.b.o.a(a:211)
   at com.yourkit.b.o.b(a:53)
   at com.yourkit.b.q.a(a:3385)
   at com.yourkit.b.q.updateTables(a:320)
   at com.yourkit.api.ControllerImpl$31.perform(a:12)
   at com.yourkit.api.ControllerImpl.makeRequest(a:18)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.updateDatabaseTables(a:200)
   at com.yourkit.k.jd.b(a:119)
   at com.yourkit.k.jd.b(a:286)
   at com.yourkit.k.jm.a(a:150)
   at com.yourkit.api.ControllerImpl$30.perform(a:3)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.runBatch(a:544)
   at com.yourkit.k.jm.run(a:150)

18.04-61 8341.339: com.yourkit.k.jm: LC@924ccd1{localhost:59570,pid=23851}: com.yourkit.b.bb: Bad stream from profiled application
Technical detail: EOF
   at com.yourkit.b.o.a(a:211)
   at com.yourkit.b.o.b(a:60)
   at com.yourkit.b.q.a(a:1275)
   at com.yourkit.b.q.updateTables(a:320)
   at com.yourkit.api.ControllerImpl$31.perform(a:12)
   at com.yourkit.api.ControllerImpl.makeRequest(a:18)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.updateDatabaseTables(a:200)
   at com.yourkit.k.jd.b(a:119)
   at com.yourkit.k.jd.b(a:286)
   at com.yourkit.k.jm.a(a:150)
   at com.yourkit.api.ControllerImpl$30.perform(a:3)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.runBatch(a:544)
   at com.yourkit.k.jm.run(a:150)

18.04-61 8341.339: com.yourkit.k.jm: LC@1fe95a4b{localhost:59991,pid=23983}: com.yourkit.b.bb: Bad stream from profiled application
Technical detail: EOF
   at com.yourkit.b.o.a(a:211)
   at com.yourkit.b.o.b(a:74)
   at com.yourkit.b.q.a(a:1854)
   at com.yourkit.b.q.updateTables(a:320)
   at com.yourkit.api.ControllerImpl$31.perform(a:12)
   at com.yourkit.api.ControllerImpl.makeRequest(a:18)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.updateDatabaseTables(a:200)
   at com.yourkit.k.jd.b(a:119)
   at com.yourkit.k.jd.b(a:286)
   at com.yourkit.k.jm.a(a:150)
   at com.yourkit.api.ControllerImpl$30.perform(a:3)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.runBatch(a:544)
   at com.yourkit.k.jm.run(a:150)

18.04-61 8344.342: com.yourkit.k.jm: LC@1fe95a4b{localhost:59991,pid=23983}: com.yourkit.util.bs: There's no application running at localhost with profiler agent configured to listen on port 59991
   at com.yourkit.api.ControllerImpl.transformException(a:273)
   at com.yourkit.api.ControllerImpl.makeRequest(a:293)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.runBatch(a:544)
   at com.yourkit.k.jm.run(a:150)

18.04-61 8346.665: com.yourkit.b.bh: LC@74c29709{localhost:60361,pid=23651}: created; local=false
18.04-61 8347.545: com.yourkit.b.q: snapshot_outer: starting: null
18.04-61 8347.545: com.yourkit.k.jm: LC@1fe95a4b{localhost:59991,pid=23983}: com.yourkit.util.bs: There's no application running at localhost with profiler agent configured to listen on port 59991
   at com.yourkit.api.ControllerImpl.transformException(a:273)
   at com.yourkit.api.ControllerImpl.makeRequest(a:293)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.runBatch(a:544)
   at com.yourkit.k.jm.run(a:150)

18.04-61 8347.545: com.yourkit.k.jm: LC@1fe95a4b{localhost:59991,pid=23983}: disconnected
18.04-61 8347.545: com.yourkit.b.q: controller telemetry limit: 3600
18.04-61 8347.545: com.yourkit.b.q: snapshot_outer: done in 0 sec: null
18.04-61 8379.660: com.yourkit.k.my: error: com.yourkit.util.bs: There's no application running at localhost with profiler agent configured to listen on port 60361
or profiler agent is incompatible with current version of profiler
   at com.yourkit.api.ControllerImpl.transformException(a:278)
   at com.yourkit.api.ControllerImpl.makeRequest(a:293)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.startCpuProfiling(a:154)
   at com.yourkit.k.kt.a(a:92)
   at com.yourkit.k.jo.b(a:60)
   at com.yourkit.k.d.al.a(a:183)
   at com.yourkit.k.dz.run(a:16)
Caused by: java.net.SocketTimeoutException: Read timed out
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
   at java.net.SocketInputStream.read(SocketInputStream.java:171)
   at java.net.SocketInputStream.read(SocketInputStream.java:141)
   at com.yourkit.b.bj.read(a:21)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
   at java.io.DataInputStream.readFully(DataInputStream.java:195)
   at java.io.DataInputStream.readLong(DataInputStream.java:416)
   at com.yourkit.runtime.Packet.readHeader(a:3)
   at com.yourkit.runtime.Packet.readHeader(a:51)
   at com.yourkit.runtime.Packet.readHeaderWithStandardResponse(a:17)
   at com.yourkit.api.ControllerImpl.readHeaderWithStandardResponse(a:10)
   at com.yourkit.api.ControllerImpl.access$100(a:558)
   at com.yourkit.api.ControllerImpl$3.perform(a:8)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   ... 6 more

18.04-61 9097.534: com.yourkit.k.my: error: com.yourkit.util.bs: There's no application running at localhost with profiler agent configured to listen on port 60361
or profiler agent is incompatible with current version of profiler
   at com.yourkit.api.ControllerImpl.transformException(a:278)
   at com.yourkit.api.ControllerImpl.makeRequest(a:293)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.startCpuProfiling(a:154)
   at com.yourkit.k.kt.a(a:92)
   at com.yourkit.k.jo.b(a:60)
   at com.yourkit.k.d.al.a(a:183)
   at com.yourkit.k.dz.run(a:16)
Caused by: java.net.SocketTimeoutException: Read timed out
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
   at java.net.SocketInputStream.read(SocketInputStream.java:171)
   at java.net.SocketInputStream.read(SocketInputStream.java:141)
   at com.yourkit.b.bj.read(a:21)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
   at java.io.DataInputStream.readFully(DataInputStream.java:195)
   at java.io.DataInputStream.readLong(DataInputStream.java:416)
   at com.yourkit.runtime.Packet.readHeader(a:3)
   at com.yourkit.runtime.Packet.readHeader(a:51)
   at com.yourkit.runtime.Packet.readHeaderWithStandardResponse(a:17)
   at com.yourkit.api.ControllerImpl.readHeaderWithStandardResponse(a:10)
   at com.yourkit.api.ControllerImpl.access$100(a:558)
   at com.yourkit.api.ControllerImpl$3.perform(a:8)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   ... 6 more

18.04-61 9191.727: com.yourkit.k.jm: LC@74c29709{localhost:60361,pid=23651}: com.yourkit.util.bs: There's no application running at localhost with profiler agent configured to listen on port 60361
or profiler agent is incompatible with current version of profiler
   at com.yourkit.api.ControllerImpl.transformException(a:278)
   at com.yourkit.api.ControllerImpl.makeRequest(a:293)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.getStatus(a:308)
   at com.yourkit.api.ControllerImpl.cacheStatuses(a:175)
   at com.yourkit.k.jd.b(a:130)
   at com.yourkit.k.jd.b(a:286)
   at com.yourkit.k.jm.a(a:150)
   at com.yourkit.api.ControllerImpl$30.perform(a:3)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.runBatch(a:544)
   at com.yourkit.k.jm.run(a:150)
Caused by: java.io.EOFException
   at java.io.DataInputStream.readFully(DataInputStream.java:197)
   at java.io.DataInputStream.readLong(DataInputStream.java:416)
   at com.yourkit.runtime.Packet.readHeader(a:3)
   at com.yourkit.runtime.Packet.readHeader(a:51)
   at com.yourkit.runtime.Packet.readHeaderWithStandardResponse(a:17)
   at com.yourkit.api.ControllerImpl.readHeaderWithStandardResponse(a:10)
   at com.yourkit.api.ControllerImpl.access$100(a:558)
   at com.yourkit.api.ControllerImpl$2.perform(a:5)
   at com.yourkit.api.ControllerImpl.makeRequest(a:18)
   ... 11 more

18.04-61 9268.954: com.yourkit.h.c.k: SSH: delPortForwarding error: Task java.util.concurrent.FutureTask@3ea383e2 rejected from java.util.concurrent.ThreadPoolExecutor@60cb8835[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 55]
18.04-61 9271.891: com.yourkit.h.a.e: 
  cmd: /home/dpagmk/software/jdk1.7.0_45/jre/bin/java -cp .yjp/2018.04-b61/lib/yourkit.jar -Dfile.encoding=UTF-8 -Dyk.logger.stdErrOnly=true com.yourkit.Main -host-server
  request: getVmInfos
  exit code: -1
  stdout:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f509d520ac0, pid=16167, tid=139984557885184
#
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libyjpagent.so+0x14cac0]  Options::containsSubstring(YStringImpl<char> const&)+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/admin/hs_err_pid16167.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

18.04-61 9278.271: com.yourkit.b.bh: LC@3f153e3{localhost:61219,pid=23720}: created; local=false
18.04-61 9279.359: com.yourkit.b.q: snapshot_outer: starting: null
18.04-61 9279.359: com.yourkit.b.q: controller telemetry limit: 3600
18.04-61 9279.359: com.yourkit.b.q: snapshot_outer: done in 0 sec: null
18.04-61 9313.164: com.yourkit.k.my: error: com.yourkit.util.bs: There's no application running at localhost with profiler agent configured to listen on port 61219
or profiler agent is incompatible with current version of profiler
   at com.yourkit.api.ControllerImpl.transformException(a:278)
   at com.yourkit.api.ControllerImpl.makeRequest(a:293)
   at com.yourkit.api.ControllerImpl.makeRequest(a:534)
   at com.yourkit.api.ControllerImpl.startCpuProfiling(a:154)
   at com.yourkit.k.kt.a(a:92)
   at com.yourkit.k.jo.b(a:60)
   at com.yourkit.k.d.al.a(a:183)
   at com.yourkit.k.dz.run(a:16)
Caused by: java.net.SocketTimeoutException: Read timed out
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
   at java.net.SocketInputStream.read(SocketInputStream.java:171)
   at java.net.SocketInputStream.read(SocketInputStream.java:141)
   at com.yourkit.b.bj.read(a:21)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
   at java.io.DataInputStream.readFully(DataInputStream.java:195)
   at java.io.DataInputStream.readLong(DataInputStream.java:416)
   at com.yourkit.runtime.Packet.readHeader(a:3)
   at com.yourkit.runtime.Packet.readHeader(a:51)
   at com.yourkit.runtime.Packet.readHeaderWithStandardResponse(a:17)
   at com.yourkit.api.ControllerImpl.readHeaderWithStandardResponse(a:10)
   at com.yourkit.api.ControllerImpl.access$100(a:558)
   at com.yourkit.api.ControllerImpl$3.perform(a:8)
   at com.yourkit.api.ControllerImpl.makeRequest(a:163)
   ... 6 more

It would be great if someone can explain and guide in this matter.

Thanks in advance!

like image 349
Aarij Siddiqui Avatar asked May 06 '18 13:05

Aarij Siddiqui


2 Answers

So finally I was able to solve my problem with the help of Yourkit support team. Here is what they told me:

Please try to increase socket timeouts of the profiler profiler UI by specifying -Dyk.controller.connect.timeout.ms= (default is 5000 ms = 5 s) and -Dyk.controller.read.timeout.ms= (default is 30000 ms = 30 s) in /.yjp/ui.ini

For example, set

-Dyk.controller.connect.timeout.ms=60000 -Dyk.controller.read.timeout.ms=60000

I hope it is helpful to others facing the same issue.

like image 140
Aarij Siddiqui Avatar answered Sep 28 '22 02:09

Aarij Siddiqui


I've just faced the same strange behavior. A day ago I manged to profile the app remotly but not today. I connect to the remote JVM through SSH and any settings has not been changed.

like image 36
aime Avatar answered Sep 28 '22 03:09

aime