-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.263.3
Bitbucket Server Integration 2.1.1
Atlassian Bitbucket v7.6.3
Recently our Bitbucket integration stopped working
From Jenkins job we see this (some parts redacted):
Posting build status of INPROGRESS to ****** for commit id [********] and ref 'refs/heads/production'
Failed to post build status, additional information: The server failed to service request
On Bitbucket side we see this (some parts redacted):
2021-01-22 09:14:53,050 WARN [http-nio-7990-exec-10] ******* @P7WCJOx554x294432x0 1pokq4f 172.23.194.42,172.23.6.75,0:0:0:0:0:0:0:1 "POST /rest/api/1.0/projects/TST/repos/test/commits/3d3aaae526b9ff09f8478d6de13772a1e74624fa/builds HTTP/1.1" c.a.b.i.b.j.JenkinsBuildServerProvider$JenkinsPublicKeyCacheLoader Unable to load Jenkins public key for applicationId: ************
java.io.IOException: No header found for http://*************2021-01-22 09:14:53,052 ERROR [http-nio-7990-exec-10] ******* @P7WCJOx554x294432x0 1pokq4f 172.23.194.42,172.23.6.75,0:0:0:0:0:0:0:1 "POST /rest/api/1.0/projects/TST/repos/test/commits/3d3aaae526b9ff09f8478d6de13772a1e74624fa/builds HTTP/1.1" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exception while processing REST request: "POST /rest/api/1.0/projects/TST/repos/test/commits/3d3aaae526b9ff09f8478d6de13772a1e74624fa/builds HTTP/1.1"
com.atlassian.cache.CacheException: Failed to fetch public key from Jenkins please ensure your application link is configured correctlyCaused by: java.io.IOException: No header found for http://***********
We were experimenting with setting everything up again from scratch. And when we did a test WITHOUT the Bitbucket Server consumer configured it does work ??
We investigated the communication with wireshark, and managed to trace the cause back to some part of the http headers.
Doing a manual call of the status rest post, WITHOUT the BBS-Signature and BBS-Signature-Algorithm does work. But the moment these 2 headers are added the error occurs.
Hi Koen Dierckx, thanks for the report.
From the symptoms you described, this actually appears to be a bug in Bitbucket Server rather than the plugin specifically- for that reason I've raised a tracking ticket in our public bug tracker here: https://jira.atlassian.com/browse/BSERV-12886
To properly triage and diagnose this issue, can you please provide more detailed replication details in the tracking ticket? Specifically the process you went through setting up and app-linking Bitbucket and Jenkins. If after the bug is investigated it's found to be on the Bitbucket side, we'll close this ticket.
Thank you!