Running Atlassian products on Docker might fail during startup because of Docker Engine version
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
要約
Running an Atlassian application (Bitbucket, Confluence, Crowd, Jira Software or Jira Service Management) on a Docker container fails during the application startup.
This problem only occurs with a more recent image. Trying to start the same application with an old image works fine.
The issue only occurs if the Docker Engine version is lower than 20.10.10.
The remainder of the document will help identifying if you are running into this problem and the remediation actions.
診断
The following commands may help identifying if affected by this issue.
docker version
docker logs --follow <container-id>
The Docker version installed is lower than 20.10.10.
In this example we validated the problem with Docker version 20.10.8.
ubuntu@ip-10-100-10-10:~$ sudo apt list --installed | grep -i docker
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
docker-ce-cli/focal,now 5:20.10.8~3-0~ubuntu-focal amd64 [installed,upgradable to: 5:20.10.17~3-0~ubuntu-focal]
docker-ce-rootless-extras/focal,now 5:20.10.8~3-0~ubuntu-focal amd64 [installed,upgradable to: 5:20.10.17~3-0~ubuntu-focal]
docker-ce/focal,now 5:20.10.8~3-0~ubuntu-focal amd64 [installed,upgradable to: 5:20.10.17~3-0~ubuntu-focal]
docker-scan-plugin/focal,now 0.17.0~ubuntu-focal amd64 [installed,automatic]
ubuntu@ip-10-100-10-10:~$
ubuntu@ip-10-100-10-10:~$ docker version
Client: Docker Engine - Community
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:54:27 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:33 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0
ubuntu@ip-10-100-10-10:~$
Checking the Container logs shows one of the following errors.
Bitbucket
Starting Bitbucket on Docker may fail with an error similar to the below.
JRE_HOME '/opt/java/openjdk' is Java
Atlassian Bitbucket requires Java 8 to run
Set JRE_HOME to a Java 8 JRE and try again
Startup has been aborted
Confluence
Starting Confluence on Docker may fail with an error similar to the below examples.
Using Java: /opt/java/openjdk/bin/java
[0.019s][warning][os,thread] Failed to start thread - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
Using CATALINA_PID: /opt/atlassian/confluence/work/catalina.pid
/opt/atlassian/confluence/bin/catalina.sh: 1: eval: Syntax error: "(" unexpected
Cannot find /opt/atlassian/confluence/bin/setclasspath.sh
This file is needed to run this program
Crowd
Starting Crowd on Docker may fail with an error similar to the below.
[0.020s][warning][os,thread] Failed to start thread - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
Jira Software or Jira Service Management
Starting Jira on Docker may fail with an error similar to the below.
Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
/opt/atlassian/jira/bin/check-java.sh: line 31: [: -ne: unary operator expected
/opt/atlassian/jira/bin/set-gc-params.sh: line 5: [: -ge: unary operator expected
Unrecognized VM option 'UseGCLogFileRotation'
[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
原因
Atlassian (Docker) images were recently updated and now require Docker Engine version >= 20.10.10.
The issue is related to the update to the Adoptium OpenJDK and incompatibilities with older versions of the Docker Engine.
Refer to each product's Docker Hub page:
- Bitbucket: https://hub.docker.com/r/atlassian/bitbucket-server
- Confluence: https://hub.docker.com/r/atlassian/confluence
- Crowd: https://hub.docker.com/r/atlassian/crowd
- Jira Software: https://hub.docker.com/r/atlassian/jira-software
- Jira Service Management: https://hub.docker.com/r/atlassian/jira-servicemanagement
ソリューション
Upgrade the Docker Engine to version 20.10.10 or a more recent one.
Refer to Docker Engine release notes for more information about Docker versions.