A change in how Tomcat handles its cipher list between 8.5 and 9.0 can result in the following NullPointerException when starting Bitbucket Server if SSL is enabled on one or more additional connectors:
2019-02-14 17:30:23,983 ERROR [main] o.apache.catalina.util.LifecycleBase Failed to start component [Connector[HTTP/1.1-8443]] org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1004) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:259) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:197) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:311) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:164) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) at com.atlassian.bitbucket.internal.boot.BitbucketServerApplication.start(BitbucketServerApplication.java:247) at com.atlassian.bitbucket.internal.boot.BitbucketServerApplication.main(BitbucketServerApplication.java:82) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at com.atlassian.bitbucket.internal.launcher.BitbucketServerLauncher.start(BitbucketServerLauncher.java:151) at com.atlassian.bitbucket.internal.launcher.BitbucketServerLauncher.main(BitbucketServerLauncher.java:99) ... 6 frames trimmed Caused by: java.lang.NullPointerException: null at org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser.parse(OpenSSLCipherConfigurationParser.java:721) ... 16 common frames omitted
Workaround
Enabling SSL on the primary connector does not cause this failure, so pending a bugfix release the workaround is to move SSL to the primary connector.
For example, if Bitbucket Server has been configured to use plain HTTP on 7990 on the default connector and HTTPS on 8443 using an additional connector, switch the configuration so that the primary connector is HTTPS on 8443 and the additional connector is plain HTTP on 7990.
This results in an identical port setup, but avoids the NullPointerException during startup.
- mentioned in
-
Page Failed to load