Closed remmelt closed 7 years ago
Trying to get the workaround running I always end up with this:
Executing task ':cli:buildDockerImage' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Building image from folder '/Users/phil/dev/minimesos/cli/build/docker'.
Using tag 'containersol/minimesos-cli' for image.
Running in a non-OSGi environment
"No custom request executor provider registrations found - using default: [org.glassfish.jersey.client.ClientAsyncExecutorFactory$1]."
> Building 17% > :cli:buildDockerImage2016/08/05 09:34:22 socat[1242] E write(5, 0x7fd4ec800000, 7): Broken pipe
:cli:buildDockerImage FAILED
:cli:buildDockerImage (Thread[Daemon worker,5,main]) completed. Took 1.074 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':cli:buildDockerImage'.
> javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
* Try:
Run with --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':cli:buildDockerImage'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:40)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: javax.ws.rs.ProcessingException: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:513)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
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:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338)
at com.github.dockerjava.jaxrs.BuildImageCmdExec.execute(BuildImageCmdExec.java:68)
at com.github.dockerjava.jaxrs.BuildImageCmdExec.execute(BuildImageCmdExec.java:27)
at com.github.dockerjava.jaxrs.AbstrDockerCmdExec.exec(AbstrDockerCmdExec.java:57)
at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:29)
at com.github.dockerjava.api.command.DockerCmd$exec.call(Unknown Source)
at com.bmuschko.gradle.docker.tasks.image.DockerBuildImage.runRemoteCommand(DockerBuildImage.groovy:89)
at com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask$_start_closure1.doCall(AbstractDockerRemoteApiTask.groovy:48)
at com.bmuschko.gradle.docker.utils.DockerThreadContextClassLoader.withClasspath(DockerThreadContextClassLoader.groovy:37)
at com.bmuschko.gradle.docker.utils.ThreadContextClassLoader$withClasspath.call(Unknown Source)
at com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask.start(AbstractDockerRemoteApiTask.groovy:47)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 68 more
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:261)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:357)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:218)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:194)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:465)
... 95 more
BUILD FAILED
Total time: 6.085 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':cli:buildDockerImage'.] from daemon DaemonInfo{pid=1161, address=[e660fa56-b8a5-4535-b24b-fc666a41fea5 port:54662, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=false, lastBusy=1470382458079, context=DefaultDaemonContext[uid=a3f75516-2664-4956-94e5-f57c6486e566,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home,daemonRegistryDir=/Users/phil/.gradle/daemon,pid=1161,idleTimeout=120000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024M,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
make: *** [build] Error 1
docker for mac version is up to date (1.12.0-beta21 (build: 11019))
Not sure how to proceed here, any advise is highly appreciated :)
anyone can resolve it issue.
this is key feature to request.
Even though direct access to the unix socket might be not available right now due to the netty issue, it should still work using the workaround with socat described above. Currently this fails with the error message described in issue #488, i.e.
myuser [~]> minimesos up docker: Error response from daemon: Mounts denied: The path /usr/local/bin/docker is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info. ..
As Docker for Mac is no longer beta and has been released to the public it would be very nice if it would be supported, even with the socat work around.
Yes this is in an important issue. However I personally can't reproduce this one as I run only on Ubuntu machines. Any volunteers?
Not sure if this would help, but anyway, my 2 cents, on osx + docker, though still on the beta channel:
Version 1.12.0-beta21 (build: 11019) 5a44e81a0513f32f5c49f7d2966570893451f32f
I did
minimesos up
Pulling containersol/minimesos-cli:0.10.2
0.10.2: Pulling from containersol/minimesos-cli
6c123565ed5e: Pull complete
9c857bc97407: Pull complete
d75c878941b8: Pull complete
bd8fa145a52e: Pull complete
Digest: sha256:3a1d8876f6b9ab0235d24264376309e54e43dcf7d5f01b826fcc756224b21173
Status: Downloaded newer image for containersol/minimesos-cli:0.10.2
# Created minimesos directory at /Users/rogier/.minimesos.
docker: Error response from daemon: Mounts denied:
The path /usr/local/bin/docker
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
..
Added the path as suggested:
minimesos up
docker: Error response from daemon: mkdir /usr/local/bin/docker: file exists.
Alternatively
DOCKER_TLS_VERIFY=0 DOCKER_HOST=tcp://localhost:2375; minimesos up
docker: Error response from daemon: mkdir /usr/local/bin/docker: file exists.
throws a similar error...
Thanks @blijblijblij for looking into this. I assume you are able to run containers by running docker
directly without minimesos?
Have a look at the minimesos
script. Perhaps the script does not call docker
in the right way and you can tweak certain settings things work.
@frankscholten yes, have been running docker on mac from the closed beta, a couple of months now
(after I got fed up torturing ubuntu onto my mbp, no webcam, no standby, what a mess ...)
As for the minimesos, went through all variables and echo-ed them right before the docker run ...
DOCKER_TLS_VERIFY=0 DOCKER_HOST=tcp://127.0.0.1:2375 DOCKER_HOST_IP=127.0.0.1; minimesos up
checking some variables
---> MINIMESOS_TAG: 0.10.2
---> DOCKER_BIN: /usr/local/bin/docker
---> PARAMS: up
---> MINIMESOS_CLI_IMAGE: containersol/minimesos-cli
---> DOCKER_VERSION: 1.12.0
---> SMALLEST_VERSION: 1.11.0
---> DOCKER_HOST:
---> DOCKER_HOST_IP:
---> MINIMESOS_HOST_DIR: /Users/rogier
---> MINIMESOS_DIR: /Users/rogier/.minimesos
on with the goat
docker: Error response from daemon: mkdir /usr/local/bin/docker: file exists.
So, DOCKER_HOST
and DOCKER_HOST_IP
stayed empty, so I went in and updated the latest else to enforce it to my local setup:
if [ "$DOCKER_HOST" != "" ] && [[ $DOCKER_HOST == tcp* ]]; then
DOCKER_HOST_IP=$(echo "$DOCKER_HOST" | grep -o '[0-9]\+[.][0-9]\+[.][0-9]\+[.][0-9]\+')
elif command_exists docker-machine && [ "$DOCKER_MACHINE_NAME" != "" ]; then
DOCKER_HOST_IP=$(docker-machine ip ${DOCKER_MACHINE_NAME})
elif [ $(uname) != "Darwin" ]; then
DOCKER_HOST_IP=$(ip addr show dev docker0 | grep inet | sed -r "s/.*inet\s([0-9\.]+)\/.*/\1/" | head -n 1)
else
echo "force docker settings to my local setup"
DOCKER_TLS_VERIFY=0
DOCKER_HOST_IP="127.0.0.1"
DOCKER_HOST="tcp://127.0.0.1:2375"
fi
Gave me a:
minimesos up
force docker settings to my local setup
checking some variables
---> MINIMESOS_TAG: 0.10.2
---> DOCKER_BIN: /usr/local/bin/docker
---> PARAMS: up
---> MINIMESOS_CLI_IMAGE: containersol/minimesos-cli
---> DOCKER_VERSION: 1.12.0
---> SMALLEST_VERSION: 1.11.0
---> DOCKER_HOST: tcp://127.0.0.1:2375
---> DOCKER_HOST_IP: 127.0.0.1
---> MINIMESOS_HOST_DIR: /Users/rogier
---> MINIMESOS_DIR: /Users/rogier/.minimesos
docker: Error response from daemon: mkdir /usr/local/bin/docker: file exists.
Still the same thing, also did a rewrite of the docker run ...
, removed all variables and ran it as such, with the same result.
Btw, /usr/local/bin/docker
is the correct path, although a symlink:
ls -al /usr/local/bin/docker
8 lrwxr-xr-x 1 rogier staff 66 Aug 11 20:51 /usr/local/bin/docker -> /Users/rogier/Library/Group Containers/group.com.docker/bin/docker
So to my perception, all docker related stuff is pointing to the right things although I find mkdir /usr/local/bin/docker: file exists.
suspicious, why a mkdir
?!
Anyway, hope this clears some things up... Regards.
@blijblijblij See https://github.com/ContainerSolutions/minimesos/pull/498. I removed the /usr/local/bin
mount and put the docker
binary into the containersol/minimesos-cli
image. Can you give that a spin?
@frankscholten Yes, sticking docker bin in the container itself seems a good plan, so I checked it, and:
the good:
minimesos up
Minimesos cluster is running: 4028096578
Mesos version: 1.0.0
export MINIMESOS_NETWORK_GATEWAY=172.17.0.1
export MINIMESOS_AGENT=http://172.17.0.5:5051; export MINIMESOS_AGENT_IP=172.17.0.5
export MINIMESOS_ZOOKEEPER=zk://172.17.0.3:2181/mesos; export MINIMESOS_ZOOKEEPER_IP=172.17.0.3
export MINIMESOS_MARATHON=http://172.17.0.6:8080; export MINIMESOS_MARATHON_IP=172.17.0.6
export MINIMESOS_CONSUL=http://172.17.0.7:8500; export MINIMESOS_CONSUL_IP=172.17.0.7
export MINIMESOS_MASTER=http://172.17.0.4:5050; export MINIMESOS_MASTER_IP=172.17.0.4
the bad:
curl http://172.17.0.6:8080/ui/\#/apps
curl: (7) Failed to connect to 172.17.0.6 port 8080: Network is unreachable
the slightly less bad (within the docker container via docker exec ...):
root@f94de373950e:/marathon# curl http://172.17.0.6:8080/ui/#/apps
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Marathon</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="img/marathon-favicon.ico">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div id="marathon"></div>
<script src="main.js"></script>
</body>
</html>
So, all is up (YEAH 👍), but there is still some networking borged 👎
please update it.
@blijblijblij try running minimesos up --mapPortsToHost
. It'll make Marathon container listen on 0.0.0.0:8080
instead of a internal IP address, and the Marathon dashboard will be accessible at http://0.0.0.0:8080
.
@sww yup minimesos up --mapPortsToHost
works for docker on mac too
Though as the agent is running on a internal private ip, it still barks while entering the sandbox:
Some background while investigation and discussing this issue:
How can I test this change? AFAICS the pull request #498 has not yet been merged. Do I need to build this locally?
@jetztgradnet That's what I did -- I cloned the repo, checked out #498's branch, and ran the install script.
Ah of course, --mapPortsToHost
! Thanks everyone for helping out.
@adam-sandor Let's merge this in. Can you review this one?
@blijblijblij Are you able to build the project using docker4mac? I'm getting this error (and have been getting it ever since I first tried building without docker-machine):
java.lang.UnsatisfiedLinkError: Could not find library in classpath, tried: [libjunixsocket-macosx-1.8-x86_64.dylib, libjunixsocket-macosx-1.5-x86_64.dylib]
Full stacktrace:
Building image using context '/Users/asandor/Projects/cs/minimesos/cli/build/docker'.
Using tag 'containersol/minimesos-cli' for image.
java.lang.UnsatisfiedLinkError: Could not find library in classpath, tried: [libjunixsocket-macosx-1.8-x86_64.dylib, libjunixsocket-macosx-1.5-x86_64.dylib]
at org.newsclub.net.unix.NativeUnixSocket.load(NativeUnixSocket.java:81)
at org.newsclub.net.unix.NativeUnixSocket.<clinit>(NativeUnixSocket.java:112)
at org.newsclub.net.unix.AFUNIXSocket.<init>(AFUNIXSocket.java:36)
at org.newsclub.net.unix.AFUNIXSocket.newInstance(AFUNIXSocket.java:50)
at com.github.dockerjava.jaxrs.ApacheUnixSocket.<init>(ApacheUnixSocket.java:51)
at com.github.dockerjava.jaxrs.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:65)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:108)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:357)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:218)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:194)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at com.github.dockerjava.jaxrs.connector.ApacheConnector.apply(ApacheConnector.java:437)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
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:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338)
at com.github.dockerjava.jaxrs.async.POSTCallbackNotifier.response(POSTCallbackNotifier.java:29)
at com.github.dockerjava.jaxrs.async.AbstractCallbackNotifier.call(AbstractCallbackNotifier.java:50)
at com.github.dockerjava.jaxrs.async.AbstractCallbackNotifier.call(AbstractCallbackNotifier.java:24)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[dockerjava-jaxrs-async-0] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
java.lang.NoClassDefFoundError: Could not initialize class org.newsclub.net.unix.NativeUnixSocket
at org.newsclub.net.unix.AFUNIXSocketImpl.connect(AFUNIXSocketImpl.java:134)
at org.newsclub.net.unix.AFUNIXSocket.connect(AFUNIXSocket.java:97)
at com.github.dockerjava.jaxrs.ApacheUnixSocket.connect(ApacheUnixSocket.java:62)
at com.github.dockerjava.jaxrs.UnixConnectionSocketFactory.connectSocket(UnixConnectionSocketFactory.java:73)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:357)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:218)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:194)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at com.github.dockerjava.jaxrs.connector.ApacheConnector.apply(ApacheConnector.java:437)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
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:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338)
at com.github.dockerjava.jaxrs.async.POSTCallbackNotifier.response(POSTCallbackNotifier.java:29)
at com.github.dockerjava.jaxrs.async.AbstractCallbackNotifier.call(AbstractCallbackNotifier.java:50)
at com.github.dockerjava.jaxrs.async.AbstractCallbackNotifier.call(AbstractCallbackNotifier.java:24)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
:cli:buildDockerImage FAILED
👎 :-( yup, same here when I build it
For that problem please see the link original issue description, which links to the underlying issue in docker-java: https://github.com/docker-java/docker-java/issues/537
@gesellix https://github.com/docker-java/docker-java/pull/677 already fixed the docker-java's bug.
We have used the gradle-docker plugin on another project (se.transmode.gradle:gradle-docker:1.2
) and that one seems to work. Not sure what is it doing differently under the hood.
Like @xiaods said Docker Java now supports Mac so let's upgrade it to 3.0.6
Docker Java is upgraded. Can any of you test it out of Mac?
See this PR and branch: https://github.com/ContainerSolutions/minimesos/pull/505
@adam and I tested the master branch with Docker on Mac and we could build the project and start the cluster. The remaining problem is that IP routing is not supported.
As we workaround we will forward container ports to host ports to the cluster is accessible.
$ minimesos up --mapPortsToHost
docker: Error response from daemon: Mounts denied:
The path /usr/local/bin/docker
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
..
there is always came across issue, anyone can talk me what we have been fixed this issue?
any update?
@frankscholten follow your word, the upstream branch has been fixed it?
@xiaods Try running minimesos from the master
branch. The mount problem is fixed already.
I have merged https://github.com/ContainerSolutions/minimesos/pull/511 and Docker on Mac is now supported.
Please try it out on master
and let me know if you find anything unusual.
@frankscholten thanks for your hints, it works like a charm.
Oops. found another issue, the chronos is restart repeated. @frankscholten
@xiaods Cool, good to hear!
I will create an issue for Chronos failing.
See https://github.com/ContainerSolutions/minimesos/issues/520
I am closing this one. If there are any new problems with Docker on Mac please create a separate issue for it.
minimesos will not build on Docker for Mac. This is due to an upstream problem in docker-java, which has an upstream problem in Netty: https://github.com/docker-java/docker-java/issues/537
Switching to a different Docker java library is not an option because 1) docker-java is the de facto default, 2) our chosen Gradle plugin uses docker-java itself.
The problem is that docker-java uses Netty to connect to
/var/run/docker.sock
. Netty does not have support for connecting to Unix sockets on anything except Linux. Netty devs do not have this issue high on their priority list.There is a workaround which uses socat (
brew install socat
):socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock &
This opens a listening socket onlocalhost:2375
, no TLS.DOCKER_TLS_VERIFY=0 DOCKER_HOST=tcp://localhost:2375 make build
should now work.