awslabs / aws-codepipeline-plugin-for-jenkins

Use this plugin to integrate your Jenkins project with a pipeline in AWS CodePipeline. For more information and step-by-step directions on how to install and configure this plugin, follow the Four Stage Pipeline Tutorial. http://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-4.html
Apache License 2.0
82 stars 68 forks source link

Error fetching source, insufficient logging #1

Closed alertedsnake closed 9 years ago

alertedsnake commented 9 years ago

I get this error when building a CodePipeline Jenkins build. The workspace directory exists, but there are no files in it, and nothing anywhere tells me why the file could not be fetched.

I did give the Jenkins server's instance role the "AWSCodePipelineCustomActionAccess" IAM policy, and it also has "AmazonS3FullAccess."

How do I debug this further?

Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on build-01 in workspace /var/lib/jenkins-slave/workspace/DeployManager-Build
[AWS CodePipeline Plugin] Clearing Workspace /var/lib/jenkins-slave/workspace/DeployManager-Build before download
[AWS CodePipeline Plugin] Job '102f0570-4b94-44b2-b630-7318f1faeb70' received
[AWS CodePipeline Plugin] Detected compression type: Zip
[AWS CodePipeline Plugin] Failed to acquire artifacts: /var/lib/jenkins-slave/workspace/DeployManager-Build/pbFjPTd.zip (No such file or directory)
[AWS CodePipeline Plugin] Stacktrace:
[AWS CodePipeline Plugin] java.io.FileOutputStream.open(Native Method)
[AWS CodePipeline Plugin] java.io.FileOutputStream.<init>(FileOutputStream.java:221)
[AWS CodePipeline Plugin] java.io.FileOutputStream.<init>(FileOutputStream.java:110)
[AWS CodePipeline Plugin] com.amazonaws.codepipeline.jenkinsplugin.DownloadTools.streamReadAndDownloadObject(DownloadTools.java:58)
[AWS CodePipeline Plugin] com.amazonaws.codepipeline.jenkinsplugin.DownloadTools.attemptArtifactDownload(DownloadTools.java:41)
[AWS CodePipeline Plugin] com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM.downloadAndExtract(AWSCodePipelineSCM.java:319)
[AWS CodePipeline Plugin] com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM.checkout(AWSCodePipelineSCM.java:225)
[AWS CodePipeline Plugin] hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
[AWS CodePipeline Plugin] hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
[AWS CodePipeline Plugin] jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
[AWS CodePipeline Plugin] hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
[AWS CodePipeline Plugin] hudson.model.Run.execute(Run.java:1741)
[AWS CodePipeline Plugin] hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
[AWS CodePipeline Plugin] hudson.model.ResourceController.execute(ResourceController.java:98)
[AWS CodePipeline Plugin] hudson.model.Executor.run(Executor.java:381)
[AWS CodePipeline Plugin] 

[AWS CodePipeline Plugin] Build Failed. PutJobFailureResult
[AWS CodePipeline Plugin] Publishing Artifacts
[AWS CodePipeline Plugin] Build Failed. PutJobFailureResult
ERROR: Build step failed with exception
com.amazonaws.services.codepipeline.model.InvalidJobStateException: Job with id 102f0570-4b94-44b2-b630-7318f1faeb70 has already terminated (Service: AmazonCodePipeline; Status Code: 400; Error Code: InvalidJobStateException; Request ID: b9bb6d88-2716-11e5-8c28-95ecd369b3e2)
    at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1078)
    at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:726)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:461)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:296)
    at com.amazonaws.services.codepipeline.AmazonCodePipelineClient.invoke(AmazonCodePipelineClient.java:1704)
    at com.amazonaws.services.codepipeline.AmazonCodePipelineClient.putJobFailureResult(AmazonCodePipelineClient.java:403)
    at com.amazonaws.codepipeline.jenkinsplugin.UploadTools.putJobResult(UploadTools.java:76)
    at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher.perform(AWSCodePipelinePublisher.java:106)
    at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1766)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:381)
Build step 'AWS CodePipeline Publisher' marked build as failure
Finished: FAILURE
schmittthomas commented 9 years ago

Thank you for bringing this to our attention. We were able to reproduce the problem and we are working on a fix.

schmittthomas commented 9 years ago

We added Jenkins Remoting Support in the latest commit 1a9be5e. Closing the issue. If you have any problems, feel free to reopen it.

sudheer464 commented 7 years ago

I got the same error. please could you help me here.