Linux mid servers not auto upgradingSummaryLinux-based MID Server does not auto-upgrade and even if we manually upgrade the MID Server it throws the following error in the logs and goes down. 2024-05-21T09:59:09.661+0000 ERROR (StartupSequencer) [StartupSequencer:168] StartupSequencer threw exception, unable to perform proper startup, shutting downjava.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native at com.sun.jna.NativeLong.<clinit>(NativeLong.java:35) at oshi.util.FileUtil.readNativeLongFromBuffer(FileUtil.java:208) at oshi.driver.linux.proc.Auxv.queryAuxv(Auxv.java:39) at oshi.software.os.linux.LinuxOperatingSystem.<clinit>(LinuxOperatingSystem.java:87) at oshi.hardware.platform.linux.LinuxCentralProcessor.initProcessorCounts(LinuxCentralProcessor.java:164) at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:65) at oshi.hardware.platform.linux.LinuxCentralProcessor.<init>(LinuxCentralProcessor.java:56) at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.createProcessor(LinuxHardwareAbstractionLayer.java:43) at oshi.util.Memoizer$1.get(Memoizer.java:61) at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:48) at com.service_now.monitor.StatusMonitor$Collector.getProcessor(StatusMonitor.java:331) at com.service_now.monitor.StatusMonitor$Collector.<init>(StatusMonitor.java:289) at com.service_now.monitor.StatusMonitor.postStart(StatusMonitor.java:125) at com.snc.midserver.monitor.internal.MonitorRunner.start(MonitorRunner.java:65) at com.snc.midserver.monitor.internal.Monitors.startMonitor(Monitors.java:371) at com.snc.midserver.monitor.internal.Monitors.addMonitor(Monitors.java:353) at com.snc.midserver.monitor.internal.Monitors.lambda$start$0(Monitors.java:117) at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:297) at com.snc.midserver.monitor.internal.Monitors.start(Monitors.java:115) at com.snc.midserver.monitor.internal.Monitors.onMIDServerEvent(Monitors.java:508) at com.service_now.mid.services.Events.internalFire(Events.java:119) at com.service_now.mid.services.Events.fire(Events.java:42) at com.service_now.mid.services.StartupSequencer.startServices(StartupSequencer.java:437) at com.service_now.mid.services.StartupSequencer.testsSucceeded(StartupSequencer.java:207) at com.service_now.mid.services.StartupSequencer.startupSequencerRunnable(StartupSequencer.java:737) at java.base/java.lang.Thread.run(Thread.java:833)Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /home/servicenow/.cache/JNA/temp/jna3883736447265644887.tmp: /home/servicenow/.cache/JNA/temp/jna3883736447265644887.tmp: failed to map segment from shared object [in thread "StartupSequencer"] at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394) at java.base/java.lang.Runtime.load0(Runtime.java:755) at java.base/java.lang.System.load(System.java:1953) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1045) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:1015) at com.sun.jna.Native.<clinit>(Native.java:221) at com.sun.jna.platform.linux.Udev.<clinit>(Udev.java:37) at oshi.software.os.linux.LinuxOperatingSystem.<clinit>(LinuxOperatingSystem.java:74) ... 22 more 2024-05-21T09:59:10.051+0000 INFO (ECCSender.1) [ECCSenderCache:409] Sending ecc_queue.c4ed232194120210b6ca4254c784370c.xml2024-05-21T09:59:10.665+0000 INFO (Wrapper-Stopper) [Main:362] Stopping MID server2024-05-21T09:59:10.666+0000 INFO (Wrapper-Stopper) [Main:363] Main.handleStop() before shutdown, OperationalState=UP2024-05-21T09:59:10.666+0000 INFO (Wrapper-Stopper) [Main:365] Main.handleStop() after shutdown, OperationalState=UP2024-05-21T09:59:10.666+0000 INFO (Wrapper-Stopper) [Main:368] Disabling slf4j binding JUL -> SLF4J2024-05-21T09:59:10.766+0000 INFO (MIDServer) [MIDServerState:160] MID Server stopping2024-05-21T09:59:10.766+0000 INFO (MIDServer) [ShutdownHandler:24] Beginning shutdown operations...2024-05-21T09:59:10.766+0000 INFO (MIDServer) [ShutdownHandler:39] Marking MID as down on instance...2024-05-21T09:59:11.174+0000 INFO (MIDServer) [Instance:908] Setting mid status to DownReleaseLinux-based MID.InstructionsThis issue is very specific to Linux-based MID Server and the type of VM it runs on. Resolution Steps: 1. Create a folder that the user (user that runs the service) has access to and set the following variable in the agent/conf/wrapper-override.conf file:wrapper.java.additional.209=-Djna.tmpdir=<full-path-to-the-dir>