Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

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

Hello,

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 user@jenkins-master -t ssh -D 8002 user@jenkins-slave


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
/Applications/YourKit-Java-Profiler-2016.02.app/Contents/Info.plist
, but the profiler was still showing JVMs on my local machine so I don't believe this worked.

Any suggestions??

Thanks,

Jeff
jeffreyfquinn
 
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":

master_user@jenkins-master: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
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 7 guests