Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

How to Attach Profiler via SOCKS proxy

Moderators: Vladimir Kondratyev, Anton Katilin

How to Attach Profiler via SOCKS proxy

Postby jeffreyfquinn » Sat Sep 24, 2016 12:30 am


I would like to attach the profiler to a remote jenkins worker machine.

Our jenkins setup is such that we can only ssh into the master node, and only from there access the slave nodes which are actually running the JVM we wish to attach to.

I am able to reach the profiler via HTTP through my browser (with the help of the Chrome FoxyProxy plugin), after setting up a SOCKS proxy via a command like this:

Code: Select all
ssh -L 8157:localhost:8002 [email protected] -t ssh -D 8002 [email protected]

However when I enter a command like this into the YourKit connect to remote application dialog, it is rejected. It seems that dialog only supports the simple case of SSHing directly to a machine (and the syntax of that dialog is a little confusing to me, I'm not sure if it honors ssh_config or the options it is using for ssh tunneling).

Earlier on these forums someone suggested using the -DsocksProxyHost and -DsocksProxyPort JVM options, I attempted to add these to the JVM options YourKit client is launched with by editing
Code: Select all
, but the profiler was still showing JVMs on my local machine so I don't believe this worked.

Any suggestions??


Posts: 1
Joined: Fri Sep 23, 2016 11:30 pm

Re: How to Attach Profiler via SOCKS proxy

Postby Anton Katilin » Sat Sep 24, 2016 8:58 am

Hello Jeff

Capabilities of the built-in SSH tunnel support are described here:
https://www.yourkit.com/docs/java/help/ ... jsp#remote

The syntax is not the same as that of the ssh command. Please try the following in "Connect to remote application":

[email protected]:ssh_port jenkins-slave

This should work if jenkins-master has direct connection to jenkins-slave. For a more complex scheme you should establish the SSH tunnel manually.

but the profiler was still showing JVMs on my local machine so I don't believe this worked.

The list of locally running applications always shows only locally running applications. All work with remote applications should be performed by using "Connect to remote application".

Best regards,
Anton Katilin
Posts: 6027
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest


YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.