oliverlloyd / jmeter-ec2

Automates running Apache JMeter on Amazon EC2
GNU General Public License v3.0
464 stars 186 forks source link

SCP verify.sh - PEM asks for Passphrase #71

Closed gauravpatel2016 closed 8 years ago

gauravpatel2016 commented 8 years ago

Hi Oliver,

I am running your script on master EC2. For security reasons, our security group is set up to only accepts ssh on port 22 from internal IPs. However I noticed that "scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ............." command use public IP to SCP. What change i can make to use private ip (10.xx.xx.xx) instead of public?

Also I noticed if i change my security group to accept all inbound traffic from anywhere (unsafe), i noticed it asks for PassPhrase "Enter passphrase for key '/home/ubuntu/Documents/uswest2b.pem':" .... how do i resolve this?

Your help is appreciated.

Thanks, Gv

oliverlloyd commented 8 years ago

To modify the script to use internal IPs you should look at this line: https://github.com/oliverlloyd/jmeter-ec2/blob/master/jmeter-ec2.sh#L325. I'd expect you can fairly easily modify this to return the private ip, not public one.

As for the passphrase, this isn't the script asking for a password, it's the instance that you are trying to ssh onto, there's nothing I can do about that. Usually this means your key isn't present on the box you're attempting to connect to, you are using the wrong username or you set a password when you generated this key. In any case, you might find this generic help text useful: https://github.com/oliverlloyd/jmeter-ec2#why-am-i-seeing-copying-installsh-to-1-serverslost-connection. Or just do a search for: 'Enter passphrase for key'.

gauravpatel2016 commented 8 years ago

Thanks for quick reply.

Everything started working except jmeter test.

I get this error: Uncaught Exception java.lang.NoSuchMethodError: org.apache.jorphan.util.JOrphanUtils.formatDuration(J)Ljava/lang/String;. See log file for details.

Where can i see this log? is there a way to debug this? My script works fine if i run locally.

gauravpatel2016 commented 8 years ago

OK so I fixed above issue by changing Jmeter version to 3.0. Hope this helps to someone