Closed ghost closed 12 years ago
The script will check 45 times + the count of instances you have asked for, after that it will continue with as many instances as Amazon has been able to build in that time. The time is dependent on the speed of response from each call to amazon to check instance status.
So, if the call to get the instance count or the call for getting the instance status are returning rubbish then that will break this code.
Try using Set -x in the script or inserting bash -x at the start of the command for a more detailed output.
So i tried the bash -x. Can you give me an example of valid bash -x comments that i should expect when the amazon server is functioning properly. If it helps: I trying to run this off a US-EAST micro instance of Ubuntu 12
What happens when you run with the defaults? (eu, ami-e1e8d395, valid security group etc.) Post the output from Set -x here.
Hi, I have done so with the default script properties but again it doesnt detect when the instances are ready.
jmeter-ec2 Automation Script - COMPLETE
Test Results: /home/ubuntu/ec2/consumer/results/consumer-1347847554-complete.jtl
ubuntu@ip-10-99-65-113:~/ec2$ project="consumer" ./ bash -x jmeter-ec2.sh
ec2-run-instances --key $AMAZON_KEYPAIR_NAME -t $INSTANCE_TYPE -g $INSTANCE_SECURITYGROUP -n 1-$instance_count --region $REGION --availability-zone $INSTANCE_AVAILABILITYZONE $AMI_ID | awk '/^INSTANCE/ {print $2}'
)
++ awk '/^INSTANCE/ {print $2}'
++ ec2-run-instances --key UbuntuKeys -t t1.micro -g jmeter -n 1-1 --region eu-west-1 --availability-zone eu-west-1b ami-e1e8d395++ echo '> Stopping test...'
Stopping test... ++ wait ++ echo '>'
++ runcleanup ++ trap - INT ++ '[' '' -eq 1 ']' jmeter-ec2.sh: line 731: [: : integer expression expected ++ echo
++ '[' -z '' ']' ++ '[' TRUE = TRUE ']' ++ echo 'terminating instance(s)...' terminating instance(s)... ++ ec2-terminate-instances --region eu-west-1 i-2e27d465
It doesn't detect the instances are ready because you CTRL-C out of the script before it has chance to find them. You have to wait, it can take several minutes.
Also, you have status_check_limit
set to 14, this should be 45. Set it to a higher value and then do not cancel the script before it has time to complete. Go make a cup of tea of something.
Hi,
Whenever i run the script it wont go past waiting for "instance status checks to pass", ive left it on for about an hour and it hasnt moved from there. i can confirm from my amazon panel that the instances are running and the checks are 2/2. Some help please?