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.

  • Microsoft has extensive documentation on setting this up. Are you running into specific issues? docs.microsoft.com/en-us/azure/jenkins – Wesley Rolnick Oct 17 '19 at 12:27
  • Yes, when I set up Jenkins Service Connection in Azure DevOps I am getting below error. Failed to query service connection API: 'JenkinsURL'. Error Message: 'A task was canceled.' – ankit thakkar Oct 17 '19 at 12:32
  • Have you tried any steps to resolve this yet? – Wesley Rolnick Oct 17 '19 at 12:37
  • Yes, I have enabled 8080 port in VM. – ankit thakkar Oct 17 '19 at 12:37
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.
| improve this answer | |
  • 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 4: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 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.