Santiago Gonzalez

11/23/2022, 9:45 PM
Hi, This is kind of difficult to explain. I have a flow that performs a job over an EC2 Instance, and the problem is that sometimes it fails and the most of times, it succeed. The job that runs, do the following operations: 1- Download a jar from somewhere. 2- Download some script from github. 3- Execute the script with some sort of arguments. And what it does, is download data from AWS S3, process the files downloaded, and then upload the results. The errors that I usually got are like •
Main class from jar could not be found
The output directory does not exists, so it could not be synchronize to AWS S3
Do you have any idea of why these types of issues happens time to time? BTW: I am using
agent to handle EC2 Instances creation, execution and termination

Rob Freedy

11/28/2022, 3:31 PM
Hey @Santiago Gonzalez!! A couple questions that will help us troubleshoot: • Does this code run without Prefect? These errors seem to be extraneous to prefect and related to the code within the tasks • Is this for Prefect 1 or 2? • So you have a minimal reproducible example for this flow that still throws these errors? I would recommend running each task one at a time to make sure you are getting the expected result when you download the code in your task and that AWS is configured correctly to upload to the bucket.