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

Latest docker image bitbucket-server:8.1.1 fails to start (JRE_HOME not defined correctly)

Dominik Kaspar June 27, 2022

Since I use the latest bitbucket-server:8.1.1 image, Bitbucket no longer starts. I get a JDK-related error message and the last commit ea5ff21fb3 (https://bitbucket.org/atlassian-docker/docker-atlassian-bitbucket-server/commits/) is also related to a JDK change. Is that coincidence?

How to reproduce:

docker run --name="bitbucket" -d -p 7990:7990 -p 7999:7999 atlassian/bitbucket-server:8.1.1

That leads to these log entries (docker logs bitbucket):

INFO:root:Running Bitbucket with command '/opt/atlassian/bitbucket/bin/start-bitbucket.sh', arguments ['/opt/atlassian/bitbucket/bin/start-bitbucket.sh', '-fg']
The JRE_HOME environment variable is not defined correctly
This environment variable is needed to run this program
Edit set-jre-home.sh and define JRE_HOME

Startup has been aborted

 

3 answers

1 vote
Ildar July 14, 2022

It was explicitly written on docker hub bitbucket's page :facepalm
** Use docker version >= 20.10.9. **

Andrey Losenkov July 15, 2022

Thank you, Ildar! Now I also found in on https://hub.docker.com/r/atlassian/bitbucket-server page, "Overview" section.

It works after Docker engine upgrade 20.10.4 -->20.10.17.

0 votes
Ravi Soni July 21, 2022

ReplyThis issue started after Atlassian pushed a new container image on the existing tag. which brock all container. i faced the same issue and also found the fix. (a workaround).
An image tag 7.19-jdk11 was pushed to the docker hub 7 months ago, and a day back same image was pushed with some changes, and that cause this issue.

REPOSITORY                 TAG        IMAGE ID     CREATED      SIZE
atlassian/bitbucket-server 7.19-jdk11 00485016b613 33 hours ago 1.2GB
atlassian/bitbucket-server <none> 555d7734717f 7 months ago 1.2GB

Fix
if you have the old working image already downloaded, tag it with some other name and start using it,

docker tag 555d7734717f atlassian/bitbucket-server:7.19.jdk11.working

Image ID: 555d7734717f is working well,
latest Image Id: 00485016b613 is not working

Ravi

Ildar July 21, 2022

Update docker engine and new image will work

0 votes
Ildar July 13, 2022

We also faced the same issue in 7.21.2 and found that in `set-jre-home.sh` script the if-clause 

if [ -n "$JRE_HOME" ] && [[ -x "$JRE_HOME/bin/java" ]]; then
...

always negative due to [-x "$JRE_HOME/bin/java"] shows the binary is not executable, but it is 

Andrey Losenkov July 13, 2022

And at the same time, a month ago 7.21.2 deployed well, but now we wanted to deploy it with different properties and faced this issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events