Confluence on Docker: Wrong parameters passed to Synchrony

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: 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 は除く

要約

As per the Confluence Docker HUB we have 3 JVM properties to pass Heap memory and code cache size.

  • JVM_MINIMUM_MEMORY
  • JVM_MAXIMUM_MEMORY
  • JVM_RESERVED_CODE_CACHE_SIZE

For passing other JVM properties like Synchrony Heap, Forward Proxy, etc, the Confluence Docker image provides another flag for that.

  • JVM_SUPPORT_RECOMMENDED_ARGS 


If we have one environment variable for JVM_SUPPORT_RECOMMENDED_ARGS we can pass that like below in the docker run command.

docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence

If you have more than one environment variable for JVM_SUPPORT_RECOMMENDED_ARGS, you can pass those variables in the same Run command or create one file, and that you can pass to the Confluence Run command. 

原因

If we don't pass these values properly, we will see some issues like below 

JVM_SUPPORT_RECOMMENDED_ARGS='-Dsynchrony.memory.max=2g -Datlassian.mail.fetchdisabled=true -Datlassian.mail.senddisabled=true -Dcrowd.use.legacy.ad.incremental.sync=true'

ソリューション

The correct way to pass the value if they are more than one:

オプション 1

Here we need to pass all values in " quotes

docker run -e JVM_SUPPORT_RECOMMENDED_ARGS="-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -Dsynchrony.memory.max=2g -Datlassian.mail.fetchdisabled=true -Datlassian.mail.senddisabled=true -Dcrowd.use.legacy.ad.incremental.sync=true" -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence
オプション 2

Create env_variable file and set all variables without any quotes like the below:

JVM_SUPPORT_RECOMMENDED_ARGS= -Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -Dsynchrony.memory.max=2g -Datlassian.mail.fetchdisabled=true -Datlassian.mail.senddisabled=true -Dcrowd.use.legacy.ad.incremental.sync=true

Pass this file to Confluence Docker run command

docker run --env-file my-env.txt -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence

To check if our environment variable is passed properly use the below command where the docker run command will be passed with the env option.

オプション 1

If you running the command without an environment file:

docker run -e JVM_SUPPORT_RECOMMENDED_ARGS="-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -Dsynchrony.memory.max=2g -Datlassian.mail.fetchdisabled=true -Datlassian.mail.senddisabled=true -Dcrowd.use.legacy.ad.incremental.sync=true" -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence env
オプション 2

If you are running Docker run the command with an environment variable:

docker run --env-file my-env.txt -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence env


Note - If a Docker Compose file is used to run the Confluence container, then double quotes(") are not required inside the docker-compose.yml file to include multiple variables in the JVM_SUPPORT_RECOMMENDED_ARGS.

JVM_SUPPORT_RECOMMENDED_ARGS=-Djdk.tls.client.protocols=TLSv1.3 -Dupm.plugin.upload.enabled=true -Dsynchrony.memory.max=2g



最終更新日 2024 年 4 月 5 日

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

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