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
Expand to see full output...
ubuntu@ip-10-100-10-10:~$ docker pull atlassian/bitbucket-server:7.21.1
7.21.1: Pulling from atlassian/bitbucket-server
405f018f9d1d: Already exists
9c045aca8dd9: Already exists
efd1c42ec938: Already exists
35541a1051f3: Already exists
916f58ac27a6: Pull complete
6b85b42cfe3f: Pull complete
7138cd25743b: Pull complete
a15123125861: Pull complete
ac6afafd9658: Pull complete
8c62a84e3977: Pull complete
53f8e904b5bf: Pull complete
ed2eafe9be0a: Pull complete
Digest: sha256:56dcd54599c66ba6d9d715a9d36b5346d591c7867e6db24a3fd630099ddbfe51
Status: Downloaded newer image for atlassian/bitbucket-server:7.21.1
docker.io/atlassian/bitbucket-server:7.21.1
ubuntu@ip-10-100-10-10:~$ mkdir bb-home7211
ubuntu@ip-10-100-10-10:~$ docker run --name="bitbucket-7211" \
>   -v /home/ubuntu/bb-home7211:/var/atlassian/application-data/bitbucket \
>   -d -p 7990:7990 -p 7999:7999 \
>   atlassian/bitbucket-server:7.21.1
35e266b547799f72df4bd3aeb7afa6ebc2f4d8947e507df7220551ee649c5757
ubuntu@ip-10-100-10-10:~$ docker logs --follow bitbucket-7211
WARNING:root:######################################################################
WARNING:root:Starting Bitbucket with embedded search service. Note that this is
not a recommended configuration and is known to have issues with
clean shutdown. Ideally OpenSearch (previously Elasticsearch) should
be started in a separate container/pod.
WARNING:root:######################################################################
INFO:root:User is currently root. Will change directory ownership and downgrade run user to bitbucket
INFO:root:User is currently root. Will downgrade run user to bitbucket
INFO:root:Running Bitbucket with command '/opt/atlassian/bitbucket/bin/start-bitbucket.sh', arguments ['/opt/atlassian/bitbucket/bin/start-bitbucket.sh', '-fg']
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
ubuntu@ip-10-100-10-10:~$


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:

ソリューション

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.


最終更新日 2022 年 7 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.