aws-solutions / distributed-load-testing-on-aws

Distributed Load Testing on AWS
https://aws.amazon.com/solutions/implementations/distributed-load-testing-on-aws/
Other
342 stars 123 forks source link

Test Failed: Test might be failed to run. #65

Closed floresk5 closed 2 years ago

floresk5 commented 3 years ago

What is your question?

I deployed the v2 version of the template and ran a Simple Test successfully. However, when I ran a jmx script that was working previously, I get Test Failed. I don't see much in the way of logs as to why. I see the ECS container spinning up and in running state and the Step Function status comes back - "Complete" when the jmx script runs. My question is where can we look to see why this JMX test failed. I looked in dynamo and in errorReason field I see: Test might be failed to run, but nothing else. Please let me know recommended next steps.

floresk5 commented 3 years ago

Following up I checked on the ECS container logs and I see: fatal error: An error occurred (404) when calling the HeadObject operation: Key "public/test-scenarios/jmeter/POenBe7Lrg.jmx" does not exist. This tracks with load-test.sh - https://github.com/aws-solutions/distributed-load-testing-on-aws/blob/main/deployment/ecr/distributed-load-testing-on-aws-load-tester/load-test.sh#L24 The key starting with public throws me off because in the s3 bucket i see just results/ and test-scenarios/. Are we supposed to add this public key + script to s3 bucket?

emcfins commented 3 years ago

Does this happen each time you try to run a test using a jmx file? If so, can you open your browser console and see if you see any errors when creating your test? When you upload a file in the Create Load Test page, the solution writes the file to the scenarios S3 bucket with the prefix you see above.

floresk5 commented 3 years ago

Yes, this happens every time using a jmx file. I see no error when I create the test and it runs as a working test would. One thing has come to mind as a possible disconnect; in our deployment we use an alternate domain for our cloudfront distribution. However, dltconsoleresourcesdltcl bucket policy refers to the cloud distribution user arn and I updated the CORS policy on dlttestrunnerstoragedlts as well. I am not sure if this is relevant, but I want to provide the context.

emcfins commented 3 years ago

That may be what's causing the issue. Can you deploy the solution without any changes and test without the alternate domain?

RyanFrench commented 2 years ago

I had the same issue, also using an alternate domain name. I've now updated the CORS policy to include the alternate domain name and everything is now working as expected.

emcfins commented 2 years ago

@floresk5 - are you still having the same issue with the updated CORS policy?

floresk5 commented 2 years ago

@emcfins with Ryan's suggestion, it looks like its back to normal - thanks for the help.

emcfins commented 2 years ago

Great to hear! I'll close this as it sounds like you were able to resolve your issue.