Hi everyone,
We are using the Bitbucket Server REST API to post build statuses to commits from our Jenkins pipelines:
Endpoint:
POST /rest/api/latest/projects/{projectKey}/repos/{repoSlug}/commits/{commitId}/builds
This has been working fine earlier, but recently we started getting 500 Internal Server Error consistently, even though there were no changes on the Jenkins side.
Verified:
Example:
POST https://<bitbucket>/rest/api/latest/projects/C/repos/code/commits/<commitId>/builds
Body: state=INPROGRESS, key=TEST-123, name=TEST, url=https://test
Response:
500 Internal Server Error with message: “An error occurred while processing the request”
Additional notes:
Questions:
Environment: Bitbucket Server (self-hosted), Jenkins pipelines.
A 500 error on the build status API with no changes on the Jenkins side almost always points to something changing on the Bitbucket Server side.
As the very first thing to do, check the Bitbucket Server logs. The most important log is "BITBUCKET_HOME/log/atlassian-bitbucket.log". The 500 response you see is a generic internal server error, but the server log will contain the full stack trace with the actual root cause. Look for entries around the timestamps of your failed requests.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.