Collaborative Editing isn't working when using a Podman container
プラットフォームについて: 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 は除く
要約
When launching a container for Confluence using Podman, Collaborative Editing doesn't work. Instead, when creating a new page, we are presented to a endless spinning wheel.
The container was launched using the following command line:
podman run -d --name <container_name> -p 8090:8090 -p 8091:8091 -v <data_volume>:/var/atlassian/application-data/confluence <image>
環境
Confluence Server or Data Center 7.1.0+
Podman
診断
In the application logs we can see the following error messages:
2021-05-04 14:30:29,874 WARN [lifecycle:thread-16] [plugins.synchrony.bootstrap.SynchronyInteropBootstrap] onStart An exception occurred while waiting for Synchrony to start: java.lang.UnsatisfiedLinkError: /home/confluence/.cache/JNA/temp/jna12881934674336678335.tmp: /home/confluence/.cache/JNA/temp/jna12881934674336678335.tmp: failed to map segment from shared object: Operation not permitted
2020-03-20 14:47:11,572 ERROR [Long running task: EnableTask] [confluence.util.longrunning.ConfluenceAbstractLongRunningTask] run Long running task "EnableTask" failed to run.
-- url: /confluence/rest/synchrony-interop/enable | referer: https://confluence.domain.com/confluence/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 20f1129098170d20 | userName: admin_user
java.lang.NoClassDefFoundError: Could not initialize class oshi.jna.platform.linux.Libc
...
2021-05-04 14:53:09,183 ERROR [diagnostics-os-thread] [hardware.platform.linux.LinuxGlobalMemory] <init> Failed to get mem_unit from sysinfo. {}
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.platform.linux.LibC$Sysinfo
原因
This behavior is related to the Bug CONFSERVER-59815 - Getting issue details... STATUS and also described in the KB article Synchrony startup fails with "Failed to get mem_unit from sysinfo" error.
In this particular case, we are using a Podman container to launch Confluence. However, by default, Podman always mount volumes with noexec permission, as described in https://github.com/containers/podman/issues/4318
ソリューション
Modify the command line that launches the container to add the exec permission over the mounted volume - as for example:
podman run -d --name <container_name> -p 8090:8090 -p 8091:8091 -v <data_volume>:/var/atlassian/application-data/confluence:exec <image>