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

Intermittent 403 Forbidden

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • bitbucket-plugin
    • None
    • Jenkins 2.346.2
      Bitbucket Plugin 1.1.29 / 223.vd12f2bca5430
      openjdk11
      Ubuntu 18 / 20

      All works as expected for hours at a time, and then suddenly all actions involving Bitbucket begin to throw these errors:
      com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 403: Forbidden.
      HttpResponseProxy{HTTP/1.1 403 Forbidden [Content-Type: text/html, Cache-Control: no-cache, Connection: close, Content-Length: 737, X-Iinfo: 12-22831903-0 0NNN RT(1658506110032 7) q(0 -1 -1 -1) r(0 -1) B16 U16, Set-Cookie: visid_incap_2656060=w9wbz+2OTbuIeZ9y8XDOyn7L2mIAAAAAQUIPAAAAAACnsB9EMe5qO4e2ILyZD5aA; expires=Sat, 22 Jul 2023 08:15:34 GMT; HttpOnly; path=/; Domain=.mckesson.com, Set-Cookie: incap_ses_1404_2656060=sNW2TknY2DKgqFYk9gJ8E3/L2mIAAAAAlg+/HY+/aOMB1R76Z2jbMA==; path=/; Domain=.mckesson.com] ResponseEntityProxy{[Content-Type: text/html,Content-Length: 737,Chunked: false]}}
      at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:871)
      at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getResources(BitbucketServerAPIClient.java:823)
      at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getServerBranches(BitbucketServerAPIClient.java:576)
      at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getBranches(BitbucketServerAPIClient.java:567)
      at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:789)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
      at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:101)
      at 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:442)
      A reboot of the server allows operation to resume as expected.

      This began happening last week when I upgraded to Ubuntu 18, jdk11, and whatever the newest version of Jenkins was. Previously had been stale on Ubuntu 16 and jdk8 (but still up on weekly releases of Jenkins until jdk11 was required last month) for maybe a year or more.

      I have multiple versions above because I actually stood up two additional Jenkins instances to try and troubleshoot/solve this. Unfortunately both are having the exact same issue though less frequently (they are not really in use, just by me running tests). The second instance is one where I just blanket installed every single plugin under the sun that the original instance had - all at once. The third instance is much more stripped down and does not have most of the plugins of the others.

      Actions which can lead to this error:

      Starting a build which clones a Bitbucket repo

      Starting a multibranch pipeline scan

      Pushing a tag to Bitbucket

      The error is slightly different when configuring a job and trying to select the Bitbucket config. I can provide that if needed.

            Unassigned Unassigned
            profiction Steve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: