When running minimesos with Docker on Mac there is a problem with the junixsocket shared lib. This is because the minimesos cli container runs on alpine and it does not have the shared libraries.
bin/minimesos --debug up
Failed to run command 'up'.
javax.ws.rs.ProcessingException
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:261)
at org.glassfish.jersey.client.JerseyInvocation$3.call(JerseyInvocation.java:724)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:720)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:430)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:321)
at com.github.dockerjava.jaxrs.ListContainersCmdExec.execute(ListContainersCmdExec.java:47)
at com.github.dockerjava.jaxrs.ListContainersCmdExec.execute(ListContainersCmdExec.java:19)
at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
at com.containersol.minimesos.docker.DockerContainersUtil.getContainers(DockerContainersUtil.java:48)
at com.containersol.minimesos.mesos.MesosClusterContainersFactory.loadRunningCluster(MesosClusterContainersFactory.java:70)
at com.containersol.minimesos.cluster.MesosCluster.<init>(MesosCluster.java:88)
at com.containersol.minimesos.cluster.MesosCluster.loadCluster(MesosCluster.java:76)
at com.containersol.minimesos.cluster.ClusterRepository.loadCluster(ClusterRepository.java:31)
at com.containersol.minimesos.main.CommandUp.getCluster(CommandUp.java:133)
at com.containersol.minimesos.main.CommandUp.execute(CommandUp.java:73)
at com.containersol.minimesos.main.Main.run(Main.java:107)
at com.containersol.minimesos.main.Main.main(Main.java:59)
Caused by: java.lang.ExceptionInInitializerError
at org.newsclub.net.unix.AFUNIXSocket.<init>(AFUNIXSocket.java:36)
at org.newsclub.net.unix.AFUNIXSocket.newInstance(AFUNIXSocket.java:54)
at com.github.dockerjava.jaxrs.ApacheUnixSocket.<init>(ApacheUnixSocket.java:51)
at com.github.dockerjava.jaxrs.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:66)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:118)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:252)
... 21 more
Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.newsclub.net.unix.NativeUnixSocket.<clinit>(NativeUnixSocket.java:42)
... 36 more
Caused by: 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.newsclub.net.unix.NativeUnixSocket.<clinit>(NativeUnixSocket.java:35)
... 36 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libjunixsocket-native-2.0.4784635348267820708.so: Error loading shared library libstdc++.so.6: No such file or directory (needed by /tmp/libjunixsocket-native-2.0.4784635348267820708.so)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.newsclub.net.unix.NarSystem.loadLibrary(NarSystem.java:39)
... 41 more
The fix is to use another image, in this case debian:jessie-backports
The tests still fail on Docker on Mac because the unit test code cannot connect to the 172.x.x.x IP addresses. To solve this the following should be done:
[ ] Fix the unit tests so they use the host IP to poll the master
[ ] Update minimesos info command so it displays the host IP if it runs on Mac OS X
When running minimesos with Docker on Mac there is a problem with the junixsocket shared lib. This is because the minimesos cli container runs on alpine and it does not have the shared libraries.
The fix is to use another image, in this case
debian:jessie-backports