FaisalZaidi
FaisalZaidi

Reputation: 1

Polling for Jobs issue on Jenkins initiated from AWS pipeline

I am facing following issue on Jenkins. What I am doing is that I have setup a pipeline on AWS and it is all working fine with deployments etc. I have setup a Jenkins project already on a server separately for the testing purpose of APIs test cases.

What I am doing connecting the Jenkins server with the Build stage of the AWS. All seem to go smooth but on the Jenkins server I found the following issue.

To make it simple, I just tried to execute the date in a variable and print it (echo) and comment out the original running script command. In build execute shell area only following two command are written.

now='date +"%Y-%m-%d-%H%M%S"' echo $now

[AWS CodePipeline Plugin] Polling for jobs for action type id: [Owner: Custom, Category: Test, Provider: Jenkins_November, Version: 1, ProjectName: Chiragh_Tests] ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@5f5daea6[Chiragh_Tests] com.amazonaws.AmazonServiceException: Unable to unmarshall exception response with the unmarshallers provided (Service: AWSCodePipeline; Status Code: 404; Error Code: null; Request ID: null) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1799) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1383) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1359) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1139) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:796) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:764) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:738) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:698) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:680) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:544) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:524) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.doInvoke(AWSCodePipelineClient.java:3040) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.invoke(AWSCodePipelineClient.java:3007) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.invoke(AWSCodePipelineClient.java:2996) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.executePollForJobs(AWSCodePipelineClient.java:1990) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.pollForJobs(AWSCodePipelineClient.java:1961) at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM.pollForJobs(AWSCodePipelineSCM.java:255) at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM.compareRemoteRevisionWith(AWSCodePipelineSCM.java:191) at hudson.scm.SCM.poll(SCM.java:418) at hudson.model.AbstractProject._poll(AbstractProject.java:1388) at hudson.model.AbstractProject.poll(AbstractProject.java:1291) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:606) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:652) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

Upvotes: 0

Views: 393

Answers (1)

shariqmaws
shariqmaws

Reputation: 8890

It seems to me that either the Jenkins Server is unable to connect to the CodePipeline service or the Jenkins server has some missing dependency with respect to AWS SDK for Java.

Can you SSH into the Jenkins Server and run the following AWS CLI command to confirm connectivity with CodePipeline service:

aws codepipeline poll-for-jobs --action-type-id=category=Test,owner=Custom,provider=Jenkins_November,version=1

SSH Into a Linux Server

Installing AWS CLI

Upvotes: 0

Related Questions