Answers: <p>Problem:
  The execution user/group had permissions to run  “Execute Analysis”
  Solution:
  Update the default template with permissions and push to projects (Bulk Apply Template)</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-12-17T11:44:17.343Z
Answers: 2019-12-17T11:44:17.343Z
Answers: arielma
Body: <p>have a pipeline job which keeps failing on Sonar Quality Gate stage with the below error:</p>
  
  <blockquote>
    <p>[Bitbucket] Build result notified
    org.sonarqube.ws.client.HttpException: Error 403 on
    <a href="http://illinXXXX:XXXXX/api/qualitygates/project_status?analysisId=XXXXXXXX" rel="nofollow noreferrer">http://illinXXXX:XXXXX/api/qualitygates/project_status?analysisId=XXXXXXXX</a>
        at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:34)</p>
  </blockquote>
  
  <p>What's more strange, another pipeline from the same MS, is passing that stage. They both are using the same Sonarquebe user and token, and the same stage syntax. </p>
  
  <p>Sonarqube version: 6.7.1 (build 35068).</p>
  
  <p>Notes:</p>
  
  <ul>
  <li>I also tried <a href="https://issues.jenkins-ci.org/browse/JENKINS-48540" rel="nofollow noreferrer">this</a>, but it didn't work.</li>
  <li>The logger for org.sonarqube.ws.client not working. it doesn't write anything to the log.</li>
  </ul>
  
Comments: CC BY-SA 4.0
Comments: 2019-12-07T21:26:02.603Z
Comments: Please summarise in the Q&A what you tried.
Comments: 030
Comments: CC BY-SA 4.0
Comments: 2019-12-09T03:54:12.800Z
Comments: Go into `Manage Jenkins -> System Log` and add a new logger for `org.sonarqube.ws.client` that logs in `DEBUG` level. Otherwise there is no way to magically "guess" what's wrong here. It could be literally everything from the token being wrong, to a reverse proxy, to a plugin issue to an SSL certificate issue (although it looks like you are using `http`)
Comments: tftd
Tags: <jenkins-pipeline><sonarqube>
Title: Sonarqube stage in jenkins pipeline fails with 403 error
UserDisplayName: arielma
ThreadText: # Sonarqube stage in jenkins pipeline fails with 403 error
  
  (Asked by: username_0 on 2019-12-07)
  
  have a pipeline job which keeps failing on Sonar Quality Gate stage with the below error:
  
  > [Bitbucket] Build result notified
  > org.sonarqube.ws.client.HttpException: Error 403 on
  > <http://illinXXXX:XXXXX/api/qualitygates/project_status?analysisId=XXXXXXXX>
  > at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:34)
  
  What's more strange, another pipeline from the same MS, is passing that stage. They both are using the same Sonarquebe user and token, and the same stage syntax.
  
  Sonarqube version: 6.7.1 (build 35068).
  
  Notes:
  
  * I also tried [this](https://issues.jenkins-ci.org/browse/JENKINS-48540), but it didn't work.
  * The logger for org.sonarqube.ws.client not working. it doesn't write anything to the log.
  
  **Tags:** jenkins-pipeline, sonarqube
  
  > **Comments:**
  > **username_1**: Please summarise in the Q&A what you tried.  
  > **username_2**: Go into `Manage Jenkins -> System Log` and add a new logger for `org.sonarqube.ws.client` that logs in `DEBUG` level. Otherwise there is no way to magically "guess" what's wrong here. It could be literally everything from the token being wrong, to a reverse proxy, to a plugin issue to an SSL certificate issue (although it looks like you are using `http`)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-12-17. Score: 0 | Accepted answer
  
  Problem:
  The execution user/group had permissions to run “Execute Analysis”
  Solution:
  Update the default template with permissions and push to projects (Bulk Apply Template)
  
  
  ---
  
  