docker-client icon indicating copy to clipboard operation
docker-client copied to clipboard

docker-client does not work on ARM (e.g. Raspberry Pi)

Open bcopy opened this issue 10 years ago • 7 comments

Description

While using docker-client through the docker-maven-plugin on a Raspberry Pi (debian jessie), the wrong JFFI shared library is being used (it should refer to the ARM library build).

How to reproduce

  • Through the maven plugin invoke : mvn docker:build

What do you expect

The build should complete and the docker image be made available.

What happened instead

  • The build fails with a native exception about JFFI being the wrong binary.
not load FFI provider jnr.ffi.provider.jffi.Provider: ExceptionInInitializerError: Can't overwrite cause with java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi8109566181291199608.so: /tmp/jffi8109566181291199608.so: cannot open shared object file

Software:

  • docker version: 1.11.1
  • docker-client version: [Add docker-client version here]

Full backtrace

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.5:build (default-cli) on project pywebide: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider: ExceptionInInitializerError: Can't overwrite cause with java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /tmp/jffi8109566181291199608.so: /tmp/jffi8109566181291199608.so: cannot open shared object file: No such file or directory
[ERROR] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[ERROR] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
[ERROR] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
[ERROR] at java.lang.Runtime.load0(Runtime.java:809)
[ERROR] at java.lang.System.load(System.java:1086)
[ERROR] at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:361)
[ERROR] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:254)
[ERROR] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:434)
[ERROR] at java.lang.Class.forName0(Native Method)
[ERROR] at java.lang.Class.forName(Class.java:348)
[ERROR] at com.kenai.jffi.Init.load(Init.java:68)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45)
[ERROR] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
[ERROR] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
[ERROR] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
[ERROR] at com.kenai.jffi.Type.resolveSize(Type.java:155)
[ERROR] at com.kenai.jffi.Type.size(Type.java:138)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
[ERROR] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
[ERROR] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
[ERROR] at java.lang.Class.newInstance(Class.java:442)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57)
[ERROR] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
[ERROR] at jnr.ffi.LibraryLoader.create(LibraryLoader.java:70)
[ERROR] at jnr.unixsocket.Native.<clinit>(Native.java:72)
[ERROR] at jnr.unixsocket.UnixSocketChannel.<init>(UnixSocketChannel.java:68)
[ERROR] at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:49)
[ERROR] at com.spotify.docker.client.ApacheUnixSocket.<init>(ApacheUnixSocket.java:56)
[ERROR] at com.spotify.docker.client.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:63)
[ERROR] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:118)
[ERROR] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
[ERROR] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[ERROR] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[ERROR] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[ERROR] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
[ERROR] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
[ERROR] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:177)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
[ERROR] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:209)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/libjffi-1.2.so
[ERROR] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
[ERROR] at java.lang.Runtime.load0(Runtime.java:809)
[ERROR] at java.lang.System.load(System.java:1086)
[ERROR] at com.kenai.jffi.internal.StubLoader.loadFromBootPath(StubLoader.java:316)
[ERROR] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:249)
[ERROR] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:434)
[ERROR] at java.lang.Class.forName0(Native Method)
[ERROR] at java.lang.Class.forName(Class.java:348)
[ERROR] at com.kenai.jffi.Init.load(Init.java:68)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45)
[ERROR] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
[ERROR] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
[ERROR] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
[ERROR] at com.kenai.jffi.Type.resolveSize(Type.java:155)
[ERROR] at com.kenai.jffi.Type.size(Type.java:138)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
[ERROR] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
[ERROR] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
[ERROR] at java.lang.Class.newInstance(Class.java:442)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57)
[ERROR] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
[ERROR] at jnr.ffi.LibraryLoader.create(LibraryLoader.java:70)
[ERROR] at jnr.unixsocket.Native.<clinit>(Native.java:72)
[ERROR] at jnr.unixsocket.UnixSocketChannel.<init>(UnixSocketChannel.java:68)
[ERROR] at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:49)
[ERROR] at com.spotify.docker.client.ApacheUnixSocket.<init>(ApacheUnixSocket.java:56)
[ERROR] at com.spotify.docker.client.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:63)
[ERROR] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:118)
[ERROR] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
[ERROR] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[ERROR] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[ERROR] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[ERROR] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
[ERROR] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
[ERROR] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:177)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
[ERROR] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:209)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] java.lang.UnsatisfiedLinkError: Can't load library: /lib/libjffi-1.2.so
[ERROR] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
[ERROR] at java.lang.Runtime.load0(Runtime.java:809)
[ERROR] at java.lang.System.load(System.java:1086)
[ERROR] at com.kenai.jffi.internal.StubLoader.loadFromBootPath(StubLoader.java:316)
[ERROR] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:249)
[ERROR] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:434)
[ERROR] at java.lang.Class.forName0(Native Method)
[ERROR] at java.lang.Class.forName(Class.java:348)
[ERROR] at com.kenai.jffi.Init.load(Init.java:68)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45)
[ERROR] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
[ERROR] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
[ERROR] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
[ERROR] at com.kenai.jffi.Type.resolveSize(Type.java:155)
[ERROR] at com.kenai.jffi.Type.size(Type.java:138)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
[ERROR] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
[ERROR] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
[ERROR] at java.lang.Class.newInstance(Class.java:442)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57)
[ERROR] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
[ERROR] at jnr.ffi.LibraryLoader.create(LibraryLoader.java:70)
[ERROR] at jnr.unixsocket.Native.<clinit>(Native.java:72)
[ERROR] at jnr.unixsocket.UnixSocketChannel.<init>(UnixSocketChannel.java:68)
[ERROR] at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:49)
[ERROR] at com.spotify.docker.client.ApacheUnixSocket.<init>(ApacheUnixSocket.java:56)
[ERROR] at com.spotify.docker.client.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:63)
[ERROR] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:118)
[ERROR] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
[ERROR] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[ERROR] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[ERROR] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[ERROR] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
[ERROR] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
[ERROR] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:177)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
[ERROR] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:209)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] java.lang.UnsatisfiedLinkError: Can't load library: /usr/java/packages/lib/arm/libjffi-1.2.so
[ERROR] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
[ERROR] at java.lang.Runtime.load0(Runtime.java:809)
[ERROR] at java.lang.System.load(System.java:1086)
[ERROR] at com.kenai.jffi.internal.StubLoader.loadFromBootPath(StubLoader.java:316)
[ERROR] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:249)
[ERROR] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:434)
[ERROR] at java.lang.Class.forName0(Native Method)
[ERROR] at java.lang.Class.forName(Class.java:348)
[ERROR] at com.kenai.jffi.Init.load(Init.java:68)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
[ERROR] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45)
[ERROR] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
[ERROR] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
[ERROR] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
[ERROR] at com.kenai.jffi.Type.resolveSize(Type.java:155)
[ERROR] at com.kenai.jffi.Type.size(Type.java:138)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178)
[ERROR] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53)
[ERROR] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49)
[ERROR] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
[ERROR] at java.lang.Class.newInstance(Class.java:442)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
[ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57)
[ERROR] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
[ERROR] at jnr.ffi.LibraryLoader.create(LibraryLoader.java:70)
[ERROR] at jnr.unixsocket.Native.<clinit>(Native.java:72)
[ERROR] at jnr.unixsocket.UnixSocketChannel.<init>(UnixSocketChannel.java:68)
[ERROR] at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:49)
[ERROR] at com.spotify.docker.client.ApacheUnixSocket.<init>(ApacheUnixSocket.java:56)
[ERROR] at com.spotify.docker.client.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:63)
[ERROR] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:118)
[ERROR] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
[ERROR] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
[ERROR] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[ERROR] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[ERROR] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[ERROR] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
[ERROR] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
[ERROR] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
[ERROR] at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37)
[ERROR] at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:177)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
[ERROR] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
[ERROR] at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
[ERROR] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
[ERROR] at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:209)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

bcopy avatar Jul 25 '16 13:07 bcopy

Workaround :

Rebuild JFFI for ARM Linux from source :

sudo apt-get install build-essential
git clone https://github.com/jnr/jffi.git
cd jffi
ant jar

and

cd build/jni
sudo cp libjffi-1.2.so /usr/lib

bcopy avatar Jul 25 '16 13:07 bcopy

This seems like an issue with jnr/jffi and not docker-client, since the logic for locating libjffi.so is located within the java code of that package. The lookup order seems to be :

  1. system property "jffi.boot.library.path", (from system env or boot.path file)
  2. system property java.library.path (this is where it tries to load /usr/lib/libjffi-1.2.so, /lib/libjffi-1.2.so and /usr/java/packages/lib/arm/libjffi-1.2.so )
  3. From jffi native jar under "jni/$PLATFORM/libjffi-$VERSION.so

From the stacktrace, it seems like the library has been located in the native jar, because getStubLibraryStream -> getResourceAsStream (in loadFromJar) has some checks to ensure the returned stream is not null, and they pass. The issue seems to be with copying the located library stream into the temporary file created on /tmp.

Can you examine '/tmp/jffi8109566181291199608.so', or whichever file is mentioned during a particular run and see if it look like a proper .so file ? Would the process have read, and execute permissions on it ? It might even be worth comparing the copied .so file (for arm) to the original one in the native jar.

rgrunber avatar Jul 25 '16 14:07 rgrunber

yes I did that, the SO file is not arm v7, it's another architecture that cannot be loaded. It is indeed an issue for JFFI which I'll follow up with them, but the workaround works fine for the docker-client and the docker-maven-plugin, I just wanted to report it somewhere.

Cheers,

Brice

On Mon, Jul 25, 2016 at 4:50 PM, Roland Grunberg [email protected] wrote:

This seems like an issue with jnr/jffi and not docker-client, since the logic for locating libjffi.so is located within the java code of that package. The lookup order seems to be :

  1. system property "jffi.boot.library.path", (from system env or boot.path file)
  2. system property java.library.path (this is where it tries to load /usr/lib/libjffi-1.2.so, /lib/libjffi-1.2.so and /usr/java/packages/lib/arm/libjffi-1.2.so )
  3. From jffi native jar under "jni/$PLATFORM/libjffi-$VERSION.so

From the stacktrace, it seems like the library has been located in the native jar, because getStubLibraryStream -> getResourceAsStream (in loadFromJar) has some checks to ensure the returned stream is not null, and they pass. The issue seems to be with copying the located library stream into the temporary file created on /tmp.

Can you examine '/tmp/jffi8109566181291199608.so', or whichever file is mentioned during a particular run and see if it look like a proper .so file ? Would the process have read, and execute permissions on it ? It might even be worth comparing the copied .so file (for arm) to the original one in the native jar.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spotify/docker-client/issues/477#issuecomment-234975887, or mute the thread https://github.com/notifications/unsubscribe-auth/AAekNfvD21fOoc0pjApBIzKJMvDTrSWkks5qZM0pgaJpZM4JUGMy .

bcopy avatar Jul 25 '16 15:07 bcopy

From the stacktrace, it seems to be able to figure out that the cpu is arm, and assuming System.getProperty("os.name") resolves to 'Linux', it should be loading the correct .so. Perhaps what is being shipped in maven-central in jffi-native is simply not what your arm v7 processor supports. A 'file' call on the arm .so gives :

file jni/arm-Linux/libjffi-1.2.so jni/arm-Linux/libjffi-1.2.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=3cf32b7808a990a041d2fbbe98a07ca87b0a7d26, not stripped

rgrunber avatar Jul 25 '16 15:07 rgrunber

+1 @bcopy thank you very much for sharing!

kbaxx avatar Nov 30 '16 10:11 kbaxx

Closing as people have said it's an issue with jffi.

davidxia avatar Mar 02 '17 00:03 davidxia

Hi -- I know this is already a closed thread, but I wanted to check with you folks here to see if you have ran into the same issue I have in #743 ? I can't get the container stats without getting an exception.

moldbuster avatar May 15 '17 21:05 moldbuster