mrgatto / spring-boot-nitro-enclaves

Spring Boot library for easy creation of AWS Nitro Enclave applications
GNU General Public License v3.0
9 stars 4 forks source link

Run enclave host failure #1

Closed longzhihun closed 2 years ago

longzhihun commented 2 years ago

When I run "CID=5 java -jar simple-echo-host/target/nitro-enclaves-simple-echo-host-1.0.0-SNAPSHOT.jar", but got error:

Exception in thread "main" java.lang.reflect.InvocationTargetException 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: java.lang.UnsatisfiedLinkError: no vsockj-native-1.0-SNAPSHOT in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:871) at java.lang.System.loadLibrary(System.java:1124) at solutions.cloudarchitects.vsockj.VSockImpl.<clinit>(VSockImpl.java:8) at solutions.cloudarchitects.vsockj.BaseVSock.createImplementation(BaseVSock.java:18) at solutions.cloudarchitects.vsockj.BaseVSock.getImplementation(BaseVSock.java:25) at solutions.cloudarchitects.vsockj.VSock.<init>(VSock.java:19) at com.github.mrgatto.host.network.VSockHostClient.send(VSockHostClient.java:33) at com.github.mrgatto.host.NitroEnclaveClient.send(NitroEnclaveClient.java:32) at com.github.mrgatto.simpleecho.NitroEnclaveHostApplication.main(NitroEnclaveHostApplication.java:33) ... 8 more

Could u tell me what's wrong?

mrgatto commented 2 years ago

Ok, I think it´s missing on docs, but you need to put the lib libvsockj-native-1.0-SNAPSHOT.so somewhere on the Java Classpath.

Usually you can copy to /usr/lib64

longzhihun commented 2 years ago

It works now, thanks.