Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75106

HTTP 401 when send build status notifications to Bitbucket Server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • Jenkins 2.479.2
      Bitbucket Branch Source plugin version 933.2.0 (or newer) - possible that this problem shows earlier than this, but not able to verify

      My Jenkins job is not able to relay its build status to my Bitbucket Server.

       

      [Bitbucket] Notifying pull request build result
      ERROR: Could not send notifications
      com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 401: .
      HttpResponseProxy{HTTP/1.1 401 [Date: Thu, 09 Jan 2025 18:30:52 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Connection: keep-alive, Set-Cookie: X-Oracle-BMC-LBS-Route=3a5734333fddd75d7f410e93f2627b72eebc5fe4; Path=/; Secure; HttpOnly, X-AREQUESTID: *1G1N99Kx1110x10632603x35, Set-Cookie: BITBUCKETSESSIONID=6135D8A6BC95F9A9C10A574F2E3BFD40; Max-Age=1209600; Expires=Thu, 23 Jan 2025 18:30:52 GMT; Path=/; Secure; HttpOnly, Set-Cookie: hazelcast.sessionId=HZCF700F452B1240A3BE5DED22B8E65F79; Path=/; HttpOnly, X-AUSERID: 988453, X-AUSERNAME: access-token-user%2F1%2F401, X-ASESSIONID: cxnkxx, Cache-Control: private, no-cache, Pragma: no-cache, Cache-Control: no-cache, no-transform, Vary: x-ausername,x-auserid,cookie,accept-encoding, X-Content-Type-Options: nosniff, WWW-Authenticate: OAuth realm="https%3A%2F%2Fbitbucket.oci.oraclecorp.com"] org.apache.http.client.entity.DecompressingEntity@1010061b}
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.doRequest(BitbucketServerAPIClient.java:1097)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.postRequest(BitbucketServerAPIClient.java:1078)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.postRequest(BitbucketServerAPIClient.java:1074)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.postBuildStatus(BitbucketServerAPIClient.java:521)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketDefaulNotifier.notifyBuildStatus(BitbucketDefaulNotifier.java:51)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketBuildStatusNotifications.createStatus(BitbucketBuildStatusNotifications.java:181)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketBuildStatusNotifications.sendNotifications(BitbucketBuildStatusNotifications.java:245)
      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.impl.notifier.BitbucketBuildStatusNotifications$JobCheckoutListener.onCheckout(BitbucketBuildStatusNotifications.java:304)
      at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:182)
      at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:167)
      at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:148)
      at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:445)

       

      My Jenkins job is configured to use an Access Token for accesses to the Bitbucket server.  It is also configured to use an SSH key for cloning my repo from the server (though that should be irrelevant for this problem).

            nfalco Nikolas Falco
            coolson Corey Olson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: