Bitbucket Data Center does not start - java.net.MalformedURLException: no protocol

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

Bitbucket is not starting up (URL issue)

Environment

6.7.0

Diagnosis

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 021-03-04 03:49:01,732 INFO [main] o.s.boot.SpringApplication . ____ _ __ _ _ / / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )___ | '_ | '_| | '_ \/ _` | \ \ \ \ / ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |___, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.5.RELEASE) 2021-03-04 03:49:03,112 INFO [main] c.a.b.i.b.BitbucketServerApplication Starting BitbucketServerApplication on bitbucket-0 with PID 72 (/opt/atlassian/bitbucket/app/WEB-INF/classes started by bitbucket in /var/atlassian/application-data/bitbucket) 2021-03-04 03:49:03,114 INFO [main] c.a.b.i.b.BitbucketServerApplication No active profile set, falling back to default profiles: default 2021-03-04 03:49:08,307 INFO [main] c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 6.7.0 (6f4b9c7 built on Mon Sep 30 02:13:47 UTC 2019) 2021-03-04 03:49:08,308 INFO [main] c.a.b.i.boot.log.BuildInfoLogger JVM: AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.10+9 2021-03-04 03:49:16,233 INFO [main] c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 19.431 seconds (JVM running for 27.904) 2021-03-04 03:49:29,122 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket 2021-03-04 03:49:41,407 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket/shared 2021-03-04 03:49:42,801 WARN [spring-startup] c.h.i.HazelcastInstanceFactory Hazelcast is starting in a Java modular environment (Java 9 and newer) but without proper access to required Java packages. Use additional Java arguments to provide Hazelcast access to Java internal API. The internal API access is used to get the best performance results. Arguments to be used: --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED 2021-03-04 03:49:46,828 WARN [spring-startup] com.hazelcast.instance.Node [10.151.26.219]:5701 [bitbucket] [3.11.1] No join method is enabled! Starting standalone. 2021-03-04 03:50:36,799 INFO [spring-startup] c.a.s.i.hook.DefaultHookService Hook callback socket listening on 127.0.0.1:35783 2021-03-04 03:50:41,639 INFO [spring-startup] c.a.s.i.s.g.t.DefaultTranscodeServer Callback socket listening at 127.0.0.1:33493 2021-03-04 03:50:49,239 WARN [FelixStartLevel] o.e.g.b.e.i.s.ExtenderConfiguration Gemini Blueprint extensions bundle not present, annotation processing disabled. 2021-03-04 03:51:28,707 WARN [spring-startup] c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/plugin/connect/confluence/ in bundle com.atlassian.plugins.atlassian-connect-plugin; it does not exist 2021-03-04 03:51:29,007 WARN [spring-startup] c.a.p.c.r.StaticPluginPathScanner Cannot scan directory /static/bitbucket/internal/feature/admin/ratelimit/ in web static as it does not exist 2021-03-04 03:51:31,024 WARN [spring-startup] c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle com.atlassian.oauth.atlassian-oauth-service-provider-plugin; it does not exist 2021-03-04 03:51:31,817 WARN [spring-startup] c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle tac.bitbucket.languages.de_DE; it does not exist 2021-03-04 03:51:31,822 WARN [spring-startup] c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle tac.bitbucket.languages.fr_FR; it does not exist 2021-03-04 03:51:31,828 WARN [spring-startup] c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle tac.bitbucket.languages.ja_JP; it does not exist 2021-03-04 03:51:32,321 INFO [spring-startup] c.a.s.internal.scm.PluginScmService Bitbucket is using /usr/bin/git version 2.23.3 2021-03-04 03:51:32,643 INFO [spring-startup] c.a.b.internal.ssh.server.SshServer Starting SSH server on port 7999... 2021-03-04 03:51:32,930 INFO [spring-startup] c.a.b.internal.ssh.server.SshServer Started SSH server successfully. 2021-03-04 03:51:33,739 INFO [spring-startup] c.a.b.i.s.c.c.DefaultClusterJobManager Registering job for StartupChecksJob 2021-03-04 03:51:33,805 INFO [spring-startup] c.a.b.i.s.i.e.DefaultIndexEventQueueProcessor Event queue processor has been started 2021-03-04 03:51:33,825 INFO [spring-startup] c.a.b.i.s.c.c.DefaultClusterJobManager Registering job for ElasticsearchSynchronizeJob 2021-03-04 03:51:33,826 INFO [spring-startup] c.a.b.i.s.c.j.c.HealthCheckRunner New health check registered: SearchIndexCheck 2021-03-04 03:51:33,827 INFO [spring-startup] c.a.b.i.s.c.j.c.HealthCheckRunner New health check registered: AuthenticationCheck 2021-03-04 03:51:33,828 INFO [spring-startup] c.a.b.i.s.c.j.c.HealthCheckRunner New health check registered: KnownIssueCheck 2021-03-04 03:51:48,757 INFO [Caesium-1-2] c.a.b.i.s.i.jobs.StartupChecksJob Running startup jobs for search 2021-03-04 03:52:39,206 ERROR [http-nio-7990-exec-10] o.a.c.c.C.[.[.[/].[default] Servlet.service() for servlet [default] in context with path [] threw exception java.lang.IllegalStateException: java.net.MalformedURLException: no protocol: <base_url>/plugins/servlet/samlconsumer at com.atlassian.plugins.authentication.impl.config.saml.persistance.SamlConfigDAO.load(SamlConfigDAO.java:71) at com.atlassian.plugins.authentication.impl.config.saml.SamlConfigService.getSamlConfig(SamlConfigService.java:44) at com.atlassian.plugins.authentication.impl.config.AuthenticationConfig.isSkipExternalAuthentication(AuthenticationConfig.java:33) at com.atlassian.plugins.authentication.impl.web.filter.authentication.AuthenticationFilter.shouldAttemptAuthentication(AuthenticationFilter.java:88) at com.atlassian.plugins.authentication.impl.web.filter.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:76) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69) at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:33) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:87) at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.lang.Thread.run(Thread.java:834) ... 87 frames trimmed Caused by: java.net.MalformedURLException: no protocol: <base_url>//plugins/servlet/samlconsumer at java.base/java.net.URL.<init>(URL.java:645) at java.base/java.net.URL.<init>(URL.java:541) at java.base/java.net.URL.<init>(URL.java:488) at com.atlassian.plugins.authentication.impl.config.saml.persistance.SamlConfigDAO.load(SamlConfigDAO.java:69) ... 18 common frames omitted

Cause

It happens due to setting wrong value for 'instance.url' in  app_property table,

1 2 3 4 SELECT * FROM app_property WHERE prop_key = 'instance.url'; prop_key | prop_value --------------+----------------------- instance.url | old_url

Solution

Change the instance value as per the requirement.

1 UPDATE app_property SET prop_value='<new_url>' WHERE prop_key='instance.url';
Updated on February 26, 2025

Still need help?

The Atlassian Community is here for you.