Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Problems configuring SSL for Bitbucket

Justin Case December 14, 2017

I have installed and purchased the latest Bitbucket and I like it very much. Since I am on the latest version I have to use the properties file instead of the server.xml file to configure the ssl connector.

Here is what I have so far:

server.additional-connector.1.port=8444
server.additional-connector.1.redirect-port=8444
server.additional-connector.1.require-ssl=true
server.additional-connector.1.secure=true
server.additional-connector.1.scheme=https
server.additional-connector.1.ssl.enabled=true
server.additional-connector.1.ssl.protocol=TLSv1.2
server.additional-connector.1.ssl.key-store=C:\Atlassian\jira.jks
server.additional-connector.1.ssl.key-store-password=<password>
server.additional-connector.1.ssl.key-password=<password>
server.additional-connector.1.ssl.key-alias=jira
server.additional-connector.1.ssl.client-auth=want
server.additional-connector.1.ssl.key-store-type=jks

I picked 8444 instead of 8443 because jira is listening on 8443. This is because I have jira, bitbucket and bamboo installed on the same server.

I use the stop service bat file to stop both services then add these lines and start the services again (with the bat file). The bitbucket service starts successfully. The error log is empty at this point. After I access the page I get this error:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
Caused by: org.springframework.boot.context.embedded.tomcat.ConnectorStartFailedException: Connector configured to listen on port 8444 failed to start
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.checkThatConnectorsHaveStarted(TomcatEmbeddedServletContainer.java:222)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:198)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at com.atlassian.bitbucket.internal.boot.BitbucketServerApplication.start(BitbucketServerApplication.java:247)
at com.atlassian.bitbucket.internal.boot.BitbucketServerApplication.main(BitbucketServerApplication.java:83)
... 8 more

I am using windows server 2012 r2 with IIS. I verified the port is not listening with

netstat -aon | find "8444"

This makes sense given the error above.

Is anyone else running the latest bitbucket with ssl on IIS? What's your properties config look like?

1 answer

0 votes
Lars Olav Velle
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2017

In bitbucket_home/shared/bitbucket.properties

add:

server.secure=true
server.scheme=https
server.proxy-port=443
server.redirect-port=443
server.proxy-name=bitbucket.example.com

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events