Search before asking
What happened
I use a macbook with m1 chip, when starting StandaloneServer, I get the following error
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/k6/h_l1w_m53l76tkylxlc33q4h0000gn/T/jna-113105/jna1882043576609991586.tmp: dlopen(/private/var/folders/k6/h_l1w_m53l76tkylxlc33q4h0000gn/T/jna-113105/jna1882043576609991586.tmp, 0x0001): tried: '/private/var/folders/k6/h_l1w_m53l76tkylxlc33q4h0000gn/T/jna-113105/jna1882043576609991586.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna1882043576609991586.tmp' (no such file) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832) at java.lang.Runtime.load0(Runtime.java:811) at java.lang.System.load(System.java:1088) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) at com.sun.jna.Native.<clinit>(Native.java:190) at com.sun.jna.Pointer.<clinit>(Pointer.java:54) at com.sun.jna.Structure.<clinit>(Structure.java:2130) at oshi.hardware.platform.mac.MacCentralProcessor.<clinit>(MacCentralProcessor.java:53) at oshi.hardware.platform.mac.MacHardwareAbstractionLayer.getProcessor(MacHardwareAbstractionLayer.java:54) at org.apache.dolphinscheduler.common.utils.OSUtils.cpuUsage(OSUtils.java:136) at org.apache.dolphinscheduler.common.utils.HeartBeat.fillSystemInfo(HeartBeat.java:176) at org.apache.dolphinscheduler.common.utils.HeartBeat.encodeHeartBeat(HeartBeat.java:204) at org.apache.dolphinscheduler.server.registry.HeartBeatTask.getHeartBeatInfo(HeartBeatTask.java:71) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.registry(MasterRegistryClient.java:498) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.start(MasterRegistryClient.java:120) at org.apache.dolphinscheduler.server.master.MasterServer.run(MasterServer.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ... 18 common frames omitted
To fix this, we need upgrade oshi-core version , and modify some method calls in OSUtils to adapt the new api.
What you expected to happen
backend service can run on m1 chip system
How to reproduce
Start StandaloneServer on a m1 chip macbook
Anything else
No response
Version
dev
Are you willing to submit PR?
Code of Conduct
Search before asking
What happened
I use a macbook with m1 chip, when starting StandaloneServer, I get the following error
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/k6/h_l1w_m53l76tkylxlc33q4h0000gn/T/jna-113105/jna1882043576609991586.tmp: dlopen(/private/var/folders/k6/h_l1w_m53l76tkylxlc33q4h0000gn/T/jna-113105/jna1882043576609991586.tmp, 0x0001): tried: '/private/var/folders/k6/h_l1w_m53l76tkylxlc33q4h0000gn/T/jna-113105/jna1882043576609991586.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna1882043576609991586.tmp' (no such file) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832) at java.lang.Runtime.load0(Runtime.java:811) at java.lang.System.load(System.java:1088) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) at com.sun.jna.Native.<clinit>(Native.java:190) at com.sun.jna.Pointer.<clinit>(Pointer.java:54) at com.sun.jna.Structure.<clinit>(Structure.java:2130) at oshi.hardware.platform.mac.MacCentralProcessor.<clinit>(MacCentralProcessor.java:53) at oshi.hardware.platform.mac.MacHardwareAbstractionLayer.getProcessor(MacHardwareAbstractionLayer.java:54) at org.apache.dolphinscheduler.common.utils.OSUtils.cpuUsage(OSUtils.java:136) at org.apache.dolphinscheduler.common.utils.HeartBeat.fillSystemInfo(HeartBeat.java:176) at org.apache.dolphinscheduler.common.utils.HeartBeat.encodeHeartBeat(HeartBeat.java:204) at org.apache.dolphinscheduler.server.registry.HeartBeatTask.getHeartBeatInfo(HeartBeatTask.java:71) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.registry(MasterRegistryClient.java:498) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.start(MasterRegistryClient.java:120) at org.apache.dolphinscheduler.server.master.MasterServer.run(MasterServer.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ... 18 common frames omittedTo fix this, we need upgrade oshi-core version , and modify some method calls in OSUtils to adapt the new api.
What you expected to happen
backend service can run on m1 chip system
How to reproduce
Start StandaloneServer on a m1 chip macbook
Anything else
No response
Version
dev
Are you willing to submit PR?
Code of Conduct