Confluence on Docker: Wrong parameters passed to Synchrony

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only. This article only applies to Atlassian products on the server and data center platforms.

Summary

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. 

Cause

If we don't pass these values properly, we will see some issue 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'

Solution

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

Option 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
Option 2

Create env_variable file and set all variable without any quotes like 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

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

Option 1

If you running run the command without enviuornment 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
Option 2

If you are running Docker run 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



Last modified on Jun 3, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.