akamai / akamai-docker

Dockerfile for official Akamai's DevOps environment containing CLI packages and useful tools
Apache License 2.0
39 stars 15 forks source link

Mac M1 + Docker image akamai/shell can't use TLS certificates for sandbox #90

Open fkieling opened 1 year ago

fkieling commented 1 year ago

We use tls certificates with Akamai Sandbox. On old systems (Intel and AMD CPUs) there are no problems to use tls certificates. Then we run the docker images the sandbox has an error and don't run. This is the log:

bash-5.1# akamai sandbox start Starting Sandbox Client with arguments: Config: /cli/.akamai-cli/cache/sandbox-cli/sandboxes/4e4cc6f56958_www.computerbild.de/config.json Logging path: /cli/.akamai-cli/cache/sandbox-cli/sandboxes/4e4cc6f56958_www.computerbild.de/logs Logging file: /cli/.akamai-cli/cache/sandbox-cli/sandboxes/4e4cc6f56958_www.computerbild.de/logs/sandbox-client.log Logging config: /cli/.akamai-cli/cache/sandbox-cli/sandbox-client-1.4.0-RELEASE/conf/logback.xml Arguments: "/usr/lib/jvm/default-jvm/bin/java",-DLOG_PATH="/cli/.akamai-cli/cache/sandbox-cli/sandboxes/4e4cc6f56958_www.computerbild.de/logs",-DLOGGING_CONFIG_FILE="/cli/.akamai-cli/cache/sandbox-cli/sandbox-client-1.4.0-RELEASE/conf/logback.xml",-jar "/cli/.akamai-cli/cache/sandbox-cli/sandbox-client-1.4.0-RELEASE/lib/sandbox-client-1.4.0-RELEASE.jar",--config="/cli/.akamai-cli/cache/sandbox-cli/sandboxes/4e4cc6f56958_www.computerbild.de/config.json"

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:109) 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 conscrypt_openjdk_jni-linux-aarch_64 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871) at java.lang.Runtime.loadLibrary0(Runtime.java:871) at java.lang.System.loadLibrary(System.java:1124) at org.conscrypt.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:54) 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.conscrypt.NativeLibraryLoader$1.run(NativeLibraryLoader.java:297) at org.conscrypt.NativeLibraryLoader$1.run(NativeLibraryLoader.java:289) at java.security.AccessController.doPrivileged(Native Method) at org.conscrypt.NativeLibraryLoader.loadLibraryFromHelperClassloader(NativeLibraryLoader.java:289) at org.conscrypt.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:262) at org.conscrypt.NativeLibraryLoader.load(NativeLibraryLoader.java:162) at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:106) at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:50) at org.conscrypt.NativeCrypto.(NativeCrypto.java:65) at org.conscrypt.OpenSSLProvider.(OpenSSLProvider.java:60) at org.conscrypt.OpenSSLProvider.(OpenSSLProvider.java:53) at org.conscrypt.OpenSSLProvider.(OpenSSLProvider.java:49) at com.akamai.devpops.connector.ConnectorMain.main(ConnectorMain.java:89) ... 8 more Suppressed: java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni-linux-aarch_64 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871) at java.lang.Runtime.loadLibrary0(Runtime.java:871) at java.lang.System.loadLibrary(System.java:1124) at org.conscrypt.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:54) at org.conscrypt.NativeLibraryLoader.loadLibraryFromCurrentClassloader(NativeLibraryLoader.java:318) at org.conscrypt.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:273) ... 16 more Suppressed: java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni in java.library.path ... 29 more Suppressed: java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871) at java.lang.Runtime.loadLibrary0(Runtime.java:871) at java.lang.System.loadLibrary(System.java:1124) at org.conscrypt.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:54) at org.conscrypt.NativeLibraryLoader.loadLibraryFromCurrentClassloader(NativeLibraryLoader.java:318) at org.conscrypt.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:273) ... 16 more Suppressed: java.lang.UnsatisfiedLinkError: no conscrypt in java.library.path ... 29 more Suppressed: java.lang.UnsatisfiedLinkError: no conscrypt in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871) at java.lang.Runtime.loadLibrary0(Runtime.java:871) at java.lang.System.loadLibrary(System.java:1124) at org.conscrypt.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:54) at org.conscrypt.NativeLibraryLoader.loadLibraryFromCurrentClassloader(NativeLibraryLoader.java:318) at org.conscrypt.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:273) ... 16 more ERROR: Sandbox Client failed to start.

This is an excerpt of our config.json:

{ "sandboxServerInfo": { "secure": true, "port": 9550, "host": "0.0.0.0", "cert": { "certChainPath": "/cli/.akamai-cli/cache/sandbox-cli/certs/server.csr", "keyPath": "/cli/.akamai-cli/cache/sandbox-cli/certs/server.key" } }, "originMappings": [ { "from": "", "to": "pass-through" } ], "jwt": "" }

My system is an Apple MacBook Pro with an Apple M1 Max CPU. This problem can reproduce on systems on other colleagues - also by colleagues from Akamai.

lkowalsk-akamai-com commented 1 year ago

Thank you for rising this issue. We will investigate and update once we have some details.