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.

cannot monitor remote application which running on AWS EC2

Moderators: Vladimir Kondratyev, Anton Katilin

cannot monitor remote application which running on AWS EC2

Postby yongzhi » Wed Feb 08, 2017 7:36 pm

Hi YourKit experts,

Recently I want to utilize YourKit to remotely monitor Tomcat which is running on an AWS EC2 server.

I follow the instruction to download the remote attach wizard and execute it on the target machine. I see something like this:

>tmpdir=/home/ec2-user/username/tool/yjp-2016.02/bin
Attaching to process 3417 using options tmpdir=/home/ec2-user/username/tool/yjp-2016.02/bin
The profiler agent has attached. Waiting while it initializes...
The agent is loaded and is listening on port 10001.
You can connect to it from the profiler UI.

Running YourKit on my laptop, in the 'Connect to Remote Application' window, if I use
ec2-user@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:10001
I will get the 'Time out' error.

If I use (I suppose 22 is ssh_port here)
ec2-user@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:22 10001
I will get the 'authorization failed' error.

PS: I provide the private key file which I use to SSH this server for the SSH authorization step.

Did I used the wrong syntax here? By the way, after jyp remote attach wizard throw 'You can connect to it from the profiler UI' message, I cannot see any corresponding Java process running. Is this behavior correct? I would expect a monitoring JAVA process keep running on the target server which gather & export the data to the UI. Thanks a lot.

Best Regards,
-Yongzhi
yongzhi
 
Posts: 3
Joined: Wed Feb 08, 2017 7:12 pm

Re: cannot monitor remote application which running on AWS E

Postby Anton Katilin » Wed Feb 08, 2017 8:07 pm

Hi Yongzhi

It seems you've forgotten ":" before the local port. So it should be:

ec2-user@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:22 :10001

Or simply try

ec2-user@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com

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

Re: cannot monitor remote application which running on AWS E

Postby yongzhi » Wed Feb 08, 2017 10:48 pm

Hi Anton,

Thank you so much for your prompt response. But I am afraid that I got the error

Failed to connect to ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:22 authorization failed.

for either way you mention. However, I could use the command

`ssh -i panda_key ec2-user@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com`
log into that server.

Could you please help me out? Thanks a lot.

Best Regards,
-Yongzhi
yongzhi
 
Posts: 3
Joined: Wed Feb 08, 2017 7:12 pm

Re: cannot monitor remote application which running on AWS E

Postby Anton Katilin » Thu Feb 09, 2017 12:09 am

Remote connection dialog is explained here:
https://www.yourkit.com/docs/java/help/ ... jsp#remote

PS: I provide the private key file which I use to SSH this server for the SSH authorization step.

Do you mean that in the "SSH Authentication" dialog you choose the "Authenticate with the private key" option and properly specify the passphrase?

Please send to support@yourkit.com a screenshot of the last dialog with the error that you, as well as the profiler log file <user home>/.yjp/log/yjp-<pid>.log
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: cannot monitor remote application which running on AWS E

Postby yongzhi » Tue Feb 21, 2017 1:15 am

With Anton's great help, this issue had been solved.

The root reason is there is a non-empty passphrase I should provide as well when the connection is set up. However, I wasn't given this information since it is NOT necessary for my previous work.

Thanks Anton again for the prompt and nice help!
yongzhi
 
Posts: 3
Joined: Wed Feb 08, 2017 7:12 pm

Re: cannot monitor remote application which running on AWS E

Postby Anton Katilin » Tue Feb 21, 2017 9:05 am

Thank you :)
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 11 guests

cron