Synchrony startup fails with "Failed to get mem_unit from sysinfo" error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

Summary

After upgrading Confluence to 7.x, Synchrony is not getting start and throwing below error in the logs

The following is found in atlassian-confluence.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2020-03-20 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://t-conflu-app0.bnppua.net.intra/confluence/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 20f1129098170d20 | userName: admin2 java.lang.NoClassDefFoundError: Could not initialize class oshi.jna.platform.linux.Libc at oshi.software.os.linux.LinuxOperatingSystem.getProcessId(LinuxOperatingSystem.java:344) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.getConfluenceProcessId(DefaultSynchronyProcessManager.java:702) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.setupEnvironment(DefaultSynchronyProcessManager.java:391) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.trySetup(DefaultSynchronyProcessManager.java:709) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.lambda$startProcess$1(DefaultSynchronyProcessManager.java:603) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2020-03-20 14:49:09,179 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 at oshi.hardware.platform.linux.LinuxGlobalMemory.<init>(LinuxGlobalMemory.java:62) at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getMemory(LinuxHardwareAbstractionLayer.java:59) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.getAvailableMemory(OperatingSystemMonitor.java:211) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.checkFreeMemory(OperatingSystemMonitor.java:158) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.lambda$startMonitorThread$1(OperatingSystemMonitor.java:122) at java.base/java.lang.Thread.run(Unknown Source) 2020-03-20 14:51:09,182 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 at oshi.hardware.platform.linux.LinuxGlobalMemory.<init>(LinuxGlobalMemory.java:62) at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getMemory(LinuxHardwareAbstractionLayer.java:59) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.getAvailableMemory(OperatingSystemMonitor.java:211) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.checkFreeMemory(OperatingSystemMonitor.java:158) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.lambda$startMonitorThread$1(OperatingSystemMonitor.java:122) at java.base/java.lang.Thread.run(Unknown Source) 2020-03-20 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 at oshi.hardware.platform.linux.LinuxGlobalMemory.<init>(LinuxGlobalMemory.java:62) at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getMemory(LinuxHardwareAbstractionLayer.java:59) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.getAvailableMemory(OperatingSystemMonitor.java:211) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.checkFreeMemory(OperatingSystemMonitor.java:158) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.lambda$startMonitorThread$1(OperatingSystemMonitor.java:122) at java.base/java.lang.Thread.run(Unknown Source)

Environment

  • Confluence version 7.x onwards

  • Linux / Unix like Operating system

Step to Reproduce

  • Install Confluence for ex: 7.x in the Linux OS where Confluence home is in /home and Confluence install is in /dev .

  • Mount /home to exec permission using below command and check the permission after that

1 2 $ mount --bind /home /home $ mount -o remount,exec /home
(Auto-migrated image: description temporarily unavailable)
(Auto-migrated image: description temporarily unavailable)
  • With this Configuration, Synchrony get started properly

(Auto-migrated image: description temporarily unavailable)

  • Now let’s Change /home to noexec using below command, Stop Confluence and execute below command,

1 $ mount -o remount,noexec /home
(Auto-migrated image: description temporarily unavailable)

  • After this change, restart the Confluence,

  • Confluence started but Synchrony failed to start with below error,

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2020-04-04 18:13:12,561 ERROR [StartEventPublisher:thread-1] [hardware.platform.linux.LinuxGlobalMemory] <init> Failed to get mem_unit from sysinfo. {} java.lang.UnsatisfiedLinkError: /home/hemant/.cache/JNA/temp/jna40762817292981485.tmp: /home/hemant/.cache/JNA/temp/jna40762817292981485.tmp: failed to map segment from shared object at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828) at java.lang.Runtime.load0(Runtime.java:810) at java.lang.System.load(System.java:1088) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988) at com.sun.jna.Native.<clinit>(Native.java:195) at com.sun.jna.NativeLong.<clinit>(NativeLong.java:35) at com.sun.jna.platform.linux.LibC$Sysinfo.<clinit>(LibC.java:48) 2020-04-04 18:14:59,078 ERROR [Long running task: EnableTask] [confluence.util.longrunning.ConfluenceAbstractLongRunningTask] run Long running task "EnableTask" failed to run. -- url: /rest/synchrony-interop/enable | referer: http://192.168.1.8:8090/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 80bbe0e1a4d102dd | userName: admin java.lang.NoClassDefFoundError: Could not initialize class oshi.jna.platform.linux.Libc at oshi.software.os.linux.LinuxOperatingSystem.getProcessId(LinuxOperatingSystem.java:344) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.getConfluenceProcessId(DefaultSynchronyProcessManager.java:702) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.setupEnvironment(DefaultSynchronyProcessManager.java:391) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.trySetup(DefaultSynchronyProcessManager.java:709) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.lambda$startProcess$1(DefaultSynchronyProcessManager.java:603) 2020-04-04 18:16:07,990 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 at oshi.hardware.platform.linux.LinuxGlobalMemory.<init>(LinuxGlobalMemory.java:62) at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getMemory(LinuxHardwareAbstractionLayer.java:59) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.getAvailableMemory(OperatingSystemMonitor.java:211) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.checkFreeMemory(OperatingSystemMonitor.java:158) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.lambda$startMonitorThread$1(OperatingSystemMonitor.java:122) at java.lang.Thread.run(Thread.java:748)
(Auto-migrated image: description temporarily unavailable)

Expected Result

Synchrony should start properly without checking mount point permission. Before Confluence 7.1.x , the issue is not reproducible. If the mount has noexec, Synchrony is getting started without any problem.

Actual Result

User is unable to start the Synchrony and getting below error with Confluence version 7.x.x

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2020-04-04 18:13:12,561 ERROR [StartEventPublisher:thread-1] [hardware.platform.linux.LinuxGlobalMemory] <init> Failed to get mem_unit from sysinfo. {} java.lang.UnsatisfiedLinkError: /home/hemant/.cache/JNA/temp/jna40762817292981485.tmp: /home/hemant/.cache/JNA/temp/jna40762817292981485.tmp: failed to map segment from shared object at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828) at java.lang.Runtime.load0(Runtime.java:810) at java.lang.System.load(System.java:1088) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988) at com.sun.jna.Native.<clinit>(Native.java:195) at com.sun.jna.NativeLong.<clinit>(NativeLong.java:35) at com.sun.jna.platform.linux.LibC$Sysinfo.<clinit>(LibC.java:48) at java.lang.Thread.run(Thread.java:748) 2020-04-04 18:14:59,078 ERROR [Long running task: EnableTask] [confluence.util.longrunning.ConfluenceAbstractLongRunningTask] run Long running task "EnableTask" failed to run. -- url: /rest/synchrony-interop/enable | referer: http://192.168.1.8:8090/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 80bbe0e1a4d102dd | userName: admin java.lang.NoClassDefFoundError: Could not initialize class oshi.jna.platform.linux.Libc at oshi.software.os.linux.LinuxOperatingSystem.getProcessId(LinuxOperatingSystem.java:344) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.getConfluenceProcessId(DefaultSynchronyProcessManager.java:702) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.setupEnvironment(DefaultSynchronyProcessManager.java:391) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.trySetup(DefaultSynchronyProcessManager.java:709) at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.lambda$startProcess$1(DefaultSynchronyProcessManager.java:603) 2020-04-04 18:16:07,990 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 at oshi.hardware.platform.linux.LinuxGlobalMemory.<init>(LinuxGlobalMemory.java:62) at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getMemory(LinuxHardwareAbstractionLayer.java:59) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.getAvailableMemory(OperatingSystemMonitor.java:211) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.checkFreeMemory(OperatingSystemMonitor.java:158) at com.atlassian.confluence.internal.diagnostics.OperatingSystemMonitor.lambda$startMonitorThread$1(OperatingSystemMonitor.java:122) at java.lang.Thread.run(Thread.java:748)

Cause

This error seems to be Confluence User Home is mounted on noexec permission mount point.

Workaround

Confluence Bug for the same issue:

There are 3 workarounds to fix this issue,

  1. Remount /home as exec permission with the following command:

    1 $ mount -o remount,exec /home
  2. Transfer Confluence Home directory to another File system that has exec permission.

  3. Or, change the JNA temp dir with the following system property:

1 -Djna.tmpdir=<path>
Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.