Marketplace connectivity throws an HTTP 500 response in Bitbucket Server

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

While trying to search for a new plugin or check if a plugin is up to date, the Manage Apps page under Bitbucket Administration throws an HTTP 500 response. 

Environment

Bitbucket Server/DataCenter 7.21.x+

Diagnosis

The below error could be seen in the Bitbucket application logs:

1 2 3 022-10-14 13:36:09,670 INFO [https-jsse-nio-443-exec-15] admin @MBRT9Rx816x123573x3 baid5p XXX.XX.XXX.XX "GET /plugins/servlet/upm HTTP/1.1" c.a.m.client.MarketplaceClient GET https://marketplace.atlassian.com/rest/2/ 2022-10-14 13:36:09,670 ERROR [https-jsse-nio-443-exec-15] o.a.c.c.C.[.[.[/].[plugins] Servlet.service() for servlet [plugins] in context with path [] threw exception java.lang.IllegalArgumentException: Host name may not contain blanks

Cause

This issue has been observed after upgrading a Bitbucket instance that was running behind an outbound proxy to the 7.21.x version. While configuring the outbound proxy for Bitbucket server, it appears that there could be a typo or white space in one of the arguments. This is the root cause of the issue.

Solution

Recheck the outbound proxy configured as JVM_SUPPORT_RECOMMENDED_ARGS in the _start-webapp.sh file and remove if there are any unnecessary whites paces or typos in it. Restart Bitbucket for the changes to take effect.

Updated on February 26, 2025

Still need help?

The Atlassian Community is here for you.