Answers: <p>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:</p>
  
  <ul>
  <li>You can <a href="https://medium.com/@bbenz/azure-devops-and-jenkins-in-perfect-harmony-8c92ff980723" rel="nofollow noreferrer">follow guides</a> where other people have configured the two.  Pay special attention to the permission settings that are selected.</li>
  <li>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.</li>
  <li>Double/Triple check your URLs on both systems.  I've been burned by dropping an <strong>s</strong> on http or missing a character on a copy paste.</li>
  <li>If you are setting this up within Azure check the <a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/overview" rel="nofollow noreferrer">Azure Role Based Access Control</a> to make sure proper permissions exist.</li>
  </ul>
  
Answers: CC BY-SA 4.0
Answers: 2019-10-17T13:02:52.753Z
Answers: 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.
Answers: ankit thakkar
Answers: CC BY-SA 4.0
Answers: 2019-10-17T14:27:09.150Z
Answers: That's an internal error then.  Are you passing parameters in?  If so can you provide them?
Answers: Wesley Rolnick
Answers: CC BY-SA 4.0
Answers: 2019-10-18T04:21:29.103Z
Answers: 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.
Answers: ankit thakkar
Answers: CC BY-SA 4.0
Answers: 2019-10-18T04:47:56.400Z
Answers: 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**
Answers: ankit thakkar
Answers: CC BY-SA 4.0
Answers: 2019-10-17T12:49:11.253Z
Answers: 2019-10-17T12:49:11.253Z
Answers: Wesley Rolnick
Body: <p>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: </p>
  
  <blockquote>
    <p>Failed to query service connection API: 'JenkinsURL'. Error Message:
    'A task was canceled.'</p>
  </blockquote>
  
  <p>I have tried enabling port 8080 in the VM to resolve this.</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-10-17T12:27:48.660Z
Comments: Microsoft has extensive documentation on setting this up.  Are you running into specific issues?  https://docs.microsoft.com/en-us/azure/jenkins/
Comments: Wesley Rolnick
Comments: CC BY-SA 4.0
Comments: 2019-10-17T12:32:10.340Z
Comments: 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.'
Comments: ankit thakkar
Comments: CC BY-SA 4.0
Comments: 2019-10-17T12:37:21.197Z
Comments: Have you tried any steps to resolve this yet?
Comments: Wesley Rolnick
Comments: CC BY-SA 4.0
Comments: 2019-10-17T12:37:59.123Z
Comments: Yes, I have enabled 8080 port in VM.
Comments: ankit thakkar
Tags: <jenkins><azure-devops><cicd>
Title: Trigger Jenkins Job from Azure DevOps
UserDisplayName: ankit thakkar
ThreadText: # Trigger Jenkins Job from Azure DevOps
  
  (Asked by: username_0 on 2019-10-17)
  
  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.
  
  **Tags:** jenkins, azure-devops, cicd
  
  > **Comments:**
  > **username_1**: Microsoft has extensive documentation on setting this up.  Are you running into specific issues?  https://docs.microsoft.com/en-us/azure/jenkins/  
  > **username_0**: 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.'  
  > **username_1**: Have you tried any steps to resolve this yet?  
  > **username_0**: Yes, I have enabled 8080 port in VM.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-17. Score: 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](https://medium.com/@bbenz/azure-devops-and-jenkins-in-perfect-harmony-8c92ff980723) 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](https://docs.microsoft.com/en-us/azure/role-based-access-control/overview) to make sure proper permissions exist.
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_1**: That's an internal error then.  Are you passing parameters in?  If so can you provide them?  
  > **username_0**: 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.  
  > **username_0**: 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**  
  
  ---
  
  