4

I want to trigger Jenkins Job when anyone pushes the code in Azure DevOps Repository. However, when I set up Jenkins Service Connection in Azure DevOps I am getting the following error:

Failed to query service connection API: 'JenkinsURL'. Error Message: 'A task was canceled.'

I have tried enabling port 8080 in the VM to resolve this.

Wesley Rolnick
  • 2,747
  • 11
  • 26
ankit thakkar
  • 119
  • 3
  • 11

1 Answers1

2

The error message you have provided indicates that this is a problem with the configuration that could be permission related. Here are some steps to help resolve this issue:

  • You can follow guides where other people have configured the two. Pay special attention to the permission settings that are selected.
  • Double check your permissions on the servers. While you may have configured Jenkins to communicate with Azure DevOps, you still need to make configuration changes in DevOps.
  • Double/Triple check your URLs on both systems. I've been burned by dropping an s on http or missing a character on a copy paste.
  • If you are setting this up within Azure check the Azure Role Based Access Control to make sure proper permissions exist.
Wesley Rolnick
  • 2,747
  • 11
  • 26
  • For testing, I didn't try to Verify the connection and save the Service connection. Then I have added the "Queue Jenkins Job" task in Build Pipeline and I got below error. ##[error]crumb request failed. HttpResponse.statusCode=500 HttpResponse.statusMessage=Server Error Crumb request failed. HttpResponse.statusCode=500 HttpResponse.statusMessage=Server Error ##[error]crumb request failed. – ankit thakkar Oct 17 '19 at 13:02
  • That's an internal error then. Are you passing parameters in? If so can you provide them? – Wesley Rolnick Oct 17 '19 at 14:27
  • I have resolved this. During Service Connection setup I have passed Token instead of a password. But when I click on Verify connection still its giving me same error. I have clicked on the Ok button and setup Build Pipeline including "queue Jenkins Job" task and pipeline is working while Verify connection is failing. – ankit thakkar Oct 18 '19 at 04:21
  • For More Information, I am getting below error in Azure DevOps Service Hook for Jenkins.
    An error occurred while sending the request. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.x.xx.xx: xxx
    – ankit thakkar Oct 18 '19 at 04:47