Cannot connect to profiler from UI

Questions about YourKit Java Profiler
Post Reply
LockiStrike
Posts: 1
Joined: Thu Jan 09, 2020 11:49 am

Cannot connect to profiler from UI

Post by LockiStrike »

Hello everyone,

I'm new to YourKit and I tried to add profiler to my java application (I running my application inside docker container) following this guide https://www.yourkit.com/docs/java/help/docker.jsp . As far as I see everything goes well, no errors in logs and I can open url on port chosen for profiler Image, also there is a found application in UI Image (CPU load changes from 0 to some value)
But when I connect to this profiler I see no recorded data, and a message
Local application "PropertiesLauncher" at port localhost:10011 has terminated or connection is lost
Please can you help me with this problem?

I added profiler by this java parameter

Code: Select all

-agentpath:/usr/local/YourKit-JavaProfiler-2019.8/bin/linux-x86-64/libyjpagent.so=port=10011,listen=all
Code added to Dockerfile:

Code: Select all

RUN wget https://www.yourkit.com/download/docker/YourKit-JavaProfiler-2019.8-docker.zip -P /tmp/ \
    && unzip /tmp/YourKit-JavaProfiler-2019.8-docker.zip -d /usr/local \
    && rm /tmp/YourKit-JavaProfiler-2019.8-docker.zip
Thank you in advance.
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Cannot connect to profiler from UI

Post by Vladimir Kondratyev »

Please send log of profiler agent ( from ~/.yjp/log/ directory ) to [email protected]
Agent prints full path to log file in console when it starts.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Cannot connect to profiler from UI

Post by Anton Katilin »

Update: the problem has been solved.

The problem was that the hostname inside the container matched the hostname of the machine hosting docker.

It was solved by overriding the hostname with the help of the "--hostname" parameter of the "docker run" command.
Post Reply