gesellix / gradle-docker-plugin

Gradle Docker plugin
MIT License
80 stars 17 forks source link

buildImage fails with unknown protocol error #31

Closed parvic303 closed 9 years ago

parvic303 commented 9 years ago

I updated from version "2015-03-07T20-17-57" to "2015-04-11T22-32-01".

After doing so, the buildImage task now fails with this error:

"docker build using docker at 'unix:///var/run/docker.sock' :buildImage FAILED :buildImage (Thread[main,5,main]) completed. Took 0.15 secs.

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':buildImage'. > java.net.MalformedURLException: unknown protocol: unix"

Excerpt from the build.gradle file:

ext { localDockerHost = "unix:///var/run/docker.sock" remoteDockerHost = "http://machine.blah.net:2375" ... }

task buildImage(type: DockerBuildTask) { //dependsOn rmImage dependsOn copyWARToBuildContext

dockerHost = localDockerHost imageName = appName

buildContextDirectory = file("./docker/") }

I'm using openjdk 1.7.0_71. I saw the comment about using Oracle JDK. If I switch back to the earlier version of the plug-in, buildImage works fine.

parvic303 commented 9 years ago

Correction: I'm using open jdk 1.8.0_31

parvic303 commented 9 years ago

I tried with Oracle jdk 1.7.0_79, and got the same error.

gesellix commented 9 years ago

thanks, I'll investigate

gesellix commented 9 years ago

I have problems to reproduce the issue in my local environment. On Travis (with Oracle JDK 1.7) sometimes the tests fail, too, but I've added some code to tackle such problems. Could you please try with the latest version (same version as with your https issue :-) )?

gesellix commented 9 years ago

@ageorge303 does the image build always fail on your system? If so, could you help me finding the cause with the following steps?

The test passes on my Ubuntu 14.04 with OracleJDK 1.7.0_09 and in a Docker container with OpenJDK 1.8.0_45

parvic303 commented 9 years ago

That was successful. No errors.

Date: Sun, 26 Apr 2015 08:49:26 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 does the image build always fail on your system? If so, could you help me finding the cause with the following steps?

git clone https://github.com/gesellix-docker/docker-client.git cd docker-client ./gradlew check -Dtest.single=HttpOverUnixSocketIntegrationTest -x integrationTest -i

The test passes on my Ubuntu 14.04 with OracleJDK 1.7.0_09 and in a Docker container with OpenJDK 1.8.0_45

— Reply to this email directly or view it on GitHub.

parvic303 commented 9 years ago

I was looking at the --debug information from the version that works for me, and the subsequent ones which don't. In the versions that don't work for me, it seems to be pulling in this: kohlschutter.junixsocket

09:36:51.513 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting dependency de.gesellix:docker-client:2015-04-25T07-42-12(runtime) -> com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4(dependency: com.kohlschutter.junixsocket#junixsocket-native-common;2.0.4 {runtime=[compile(), runtime(), master()]}) 09:36:51.514 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Selecting new module version com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4 09:36:51.514 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Attempting to resolve com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4 using repositories [maven] 09:36:51.518 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyXmlModuleDescriptorParser] post 1.3 ivy file: using exact as default matcher 09:36:51.523 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Using cached module metadata for module 'com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4' in 'maven' 09:36:51.524 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Using com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4 from Maven repository 'maven' 09:36:51.525 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting dependency de.gesellix:docker-client:2015-04-25T07-42-12(runtime) -> com.kohlschutter.junixsocket:junixsocket-common:2.0.4(dependency: com.kohlschutter.junixsocket#junixsocket-common;2.0.4 {runtime=[compile(), runtime(), master()]}) 09:36:51.526 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Selecting new module version com.kohlschutter.junixsocket:junixsocket-common:2.0.4 09:36:51.526 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Attempting to resolve com.kohlschutter.junixsocket:junixsocket-common:2.0.4 using repositories [maven] 09:36:51.530 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyXmlModuleDescriptorParser] post 1.3 ivy file: using exact as default matcher 09:36:51.534 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Using cached module metadata for module 'com.kohlschutter.junixsocket:junixsocket-common:2.0.4' in 'maven' 09:36:51.534 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Using com.kohlschutter.junixsocket:junixsocket-common:2.0.4 from Maven repository 'maven' 09:36:51.535 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting configuration de.gesellix:docker-client:2015-04-25T07-42-12(master). 09:36:51.535 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting configuration org.codehaus.groovy:groovy:2.4.3(compile).

parvic303 commented 9 years ago

Another difference; Works: 09:35:16.220 [INFO] [de.gesellix.docker.client.DockerClientImpl] using docker at 'unix://localhost/var/run/docker.sock'

Doesn't work: 09:36:57.858 [INFO] [de.gesellix.docker.client.DockerClientImpl] using docker at 'unix:///var/run/docker.sock'

I tried hardcoding with localhost but it didn't change anything.

gesellix commented 9 years ago

thanks! I added some more logging output and a kind of retry mechanism. could you watch the logs for messages like could not use the 'unix' protocol and retry failed with the most recent plugin version?

gesellix commented 9 years ago

@ageorge303 can you post a stacktrace (running the Gradle script via -s) please?

parvic303 commented 9 years ago

Tobias,

I didn't see a 'retry failed' message. I'm trying to debug this in Eclipse with the Gradle plug-in, to see what is happening when the code works, and what happens when it doesn't.

Attached is stack trace.

Andy

Date: Tue, 28 Apr 2015 00:29:38 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

thanks! I added some more logging output and a kind of retry mechanism. could you watch the logs for messages like could not use the 'unix' protocol and retry failed with the most recent plugin version?

— Reply to this email directly or view it on GitHub.

:copyWARToBuildContext UP-TO-DATE :tarBuildcontextForBuildImage :buildImage could not use the 'unix' protocol to connect to /var/run/docker.sock java.net.MalformedURLException: unknown protocol: unix at java.net.URL.(URL.java:413) at java.net.URL.(URL.java:302) at java.net.URL.(URL.java:325) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198) at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getURLWithActualProtocol(DockerURLHandler.groovy:59) at de.gesellix.docker.client.protocolhandler.DockerURLHandler$getURLWithActualProtocol$0.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getURL(DockerURLHandler.groovy:31) at de.gesellix.docker.client.protocolhandler.DockerURLHandler$getURL.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at de.gesellix.docker.client.LowLevelDockerClient.getDockerBaseUrl(LowLevelDockerClient.groovy:43) at de.gesellix.docker.client.LowLevelDockerClient.openConnection(LowLevelDockerClient.groovy:260) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at de.gesellix.docker.client.LowLevelDockerClient.request(LowLevelDockerClient.groovy:69) at de.gesellix.docker.client.LowLevelDockerClient$request$1.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at de.gesellix.docker.client.LowLevelDockerClient.post(LowLevelDockerClient.groovy:57) at de.gesellix.docker.client.LowLevelDockerClient$post.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy:137) at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy) at de.gesellix.docker.client.DockerClient$build$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at de.gesellix.gradle.docker.tasks.DockerBuildTask.build(DockerBuildTask.groovy:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 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:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) 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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56) :buildImage FAILED

BUILD FAILED

Total time: 10.881 secs

parvic303 commented 9 years ago

Tobias,

I installed the gradle and groovy plugins for eclipse. I can run tasks but it's not stopping at my breakpoints. I know you can only set breakpoints in classes. How are you developing your plugin?

Andy

Date: Tue, 28 Apr 2015 09:11:43 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 can you post a stacktrace (running the Gradle script via -s) please?

— Reply to this email directly or view it on GitHub.

gesellix commented 9 years ago

@ageorge303 you can clone the plugin git repository, then build it with ./gradlew build. If you don't want to run the integration tests, use a command like ./gradlew build -x integrationTest.

Debugging from a build.gradle is quite hard, but you might want to debug through an integration test like that one: https://github.com/gesellix-docker/gradle-docker-plugin/blob/master/src/integrationTest/groovy/de/gesellix/gradle/docker/DockerPluginIntegrationTest.groovy

I sometimes don't debug, but test changes locally (without publishing the plugin to the world) by using ./gradlew build install publishToMavenLocal. The "installed" package version can be used in a normal build.gradle where you only need to make Gradle search the local Maven repository. See https://github.com/gesellix-docker/gradle-docker-plugin-example/blob/master/build.gradle#L13 for an example:

buildscript {
  repositories {
    mavenLocal()
    jcenter()
    maven { url "https://plugins.gradle.org/m2/" }
  }
  dependencies { classpath 'de.gesellix:gradle-docker-plugin:2015-04-28T11-05-43' }
}
apply plugin: "de.gesellix.docker"
gesellix commented 9 years ago

I guess you didn't use the most recent version of the plugin, I would have expected the following code with its log messages to be executed in case of a failure: https://github.com/gesellix-docker/docker-client/blob/master/src/main/groovy/de/gesellix/docker/client/protocolhandler/DockerURLHandler.groovy#L67

Please note that the plugin heavily relies on the docker-client library (also developed by me). If you want to debug changed in that library, just follow the hints in my last comment to update the plugin's docker-client dependency.

Hope that helps. I appreciate that you're also trying to debug the error, so thank you very much in advance! If you need further help, just ask.

Tobias

parvic303 commented 9 years ago

I don't understand why it's not pulling in your changes.I initially specified the dependency like this: // works with Gradle 2.1+, for the old configuration see http://plugins.gradle.org/plugin/de.gesellix.dockerplugins { // buildImage, buildAndPush, runContainer works with this version of the plugin: //id "de.gesellix.docker" version "2015-03-07T20-17-57" // deployToServer works with these versions, but buildImage breaks: //id "de.gesellix.docker" version "2015-04-11T22-32-01" //id "de.gesellix.docker" version "2015-04-22T09-44-36" //id "de.gesellix.docker" version "2015-04-25T07-47-29" id "de.gesellix.docker" version "2015-04-28T11-05-43"} Then I changed it thus: buildscript { repositories { mavenLocal() jcenter() maven { url "https://plugins.gradle.org/m2/" } maven { url 'http://dl.bintray.com/gesellix/docker-utils' } } dependencies { classpath 'de.gesellix:gradle-docker-plugin:2015-04-28T11-05-43' }} Still don't see the retry error message.What am I missing? Date: Wed, 29 Apr 2015 01:02:39 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 you can clone the plugin git repository, then build it with ./gradlew build. If you don't want to run the integration tests, use a command like ./gr.

Debugging from a build.gradle is quite hard, but you might want to debug through an integration test like that one: https://github.com/gesellix-docker/gradle-docker-plugin/blob/master/src/integrationTest/groovy/de/gesellix/gradle/docker/DockerPluginIntegrationTest.groovy

I sometimes don't debug, but test changes locally (without publishing the plugin to the world) by using ./gradlew build install publishToMavenLocal. The "installed" package version can be used in a normal build.gradle where you only need to make Gradle search the local Maven repository. See https://github.com/gesellix-docker/gradle-docker-plugin-example/blob/master/build.gradle#L13 for an example:

buildscript { repositories { mavenLocal() jcenter() maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath 'de.gesellix:gradle-docker-plugin:2015-04-28T11-05-43' } } apply plugin: "de.gesellix.docker"

— Reply to this email directly or view it on GitHub.

gesellix commented 9 years ago

I published a new release with even more debug output. Please try again with the latest version. I have no idea why the debug out didn't appear yet. Since the expected output is logged on warn or error level, I wouldn't suggest to add any options. The new debug output needs the --debug flag, though.

Could you please (again) try to execute your tasks, now including the --debug flag? Would it be possible to post your build.gradle here? Or did you have a chance to use the https://github.com/gesellix-docker/gradle-docker-plugin-example to make the build fail?

Sorry for the inconvenience!

parvic303 commented 9 years ago

import de.gesellix.gradle.docker.tasks.DockerInfoTask import de.gesellix.gradle.docker.tasks.DockerVersionTask import de.gesellix.gradle.docker.tasks.DockerPublishTask import de.gesellix.gradle.docker.tasks.* import static groovy.json.JsonOutput.prettyPrint import static groovy.json.JsonOutput.toJson

// works with Gradle 2.1+, for the old configuration see http://plugins.gradle.org/plugin/de.gesellix.docker plugins { // buildImage, buildAndPush, runContainer works with this version of the plugin: id "de.gesellix.docker" version "2015-03-07T20-17-57"

// deployToServer works with these versions, but buildImage breaks: //id "de.gesellix.docker" version "2015-04-11T22-32-01" //id "de.gesellix.docker" version "2015-04-22T09-44-36" }

// only to help IntelliJ recognize the imports for the Docker*Task classes apply plugin: 'java' apply plugin: 'maven' apply plugin: 'war' apply plugin: 'jetty' apply plugin: 'eclipse-wtp' apply plugin: 'groovy' apply plugin: 'eclipse'

repositories { mavenLocal() maven { url 'http://dl.bintray.com/gesellix/docker-utils' } mavenCentral() }

ext { localDockerHost = "unix:///var/run/docker.sock"

// Run docker daemon with http remoteDockerHost = "http://xxx.yyyy.net:2375"

// Run docker daemon with https //remoteDockerHost = "https://xxx.yyyy.net:2376"

appName = "ppppp/qqqqqq" appTag = "latest"

// fallback to ~/.dockercfg // For use with readDefaultAuthConfig() for pulling image from docker hub // deploying to remote server. dockerCfgFilename = null registryHostname = null }

allprojects { apply plugin: "de.gesellix.docker"

docker { dockerHost = localDockerHost authConfigPlain = ["username" : "user", "password" : "user_password", "email" : "user@blah.com", "serveraddress": "https://index.docker.io/v1/"] } }

dependencies { compile group: 'com.wordnik', name: 'swagger-jaxrs_2.9.1', version:'1.2.1' compile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.6.3' compile group: 'javax.servlet', name: 'servlet-api', version:'2.5' testCompile group: 'org.scalatest', name: 'scalatest_2.9.1', version:'1.6.1' testCompile group: 'junit', name: 'junit', version:'4.8.1' }

task info(type: DockerInfoTask) { doLast { println prettyPrint(toJson(info)) } }

task version(type: DockerVersionTask) { doLast { println prettyPrint(toJson(version)) } }

task wrapper(type: Wrapper) { gradleVersion = '2.2.1' distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip" }

task buildAndPush(type: DockerPublishTask) { // Push to the Docker hub. imageName = appName imageTag = appTag buildContextDirectory = file('./docker/') targetRegistries = [ dev: "registry.hub.docker.com" ] }

task rmImage(type: DockerRmiTask) { imageId = appName }

task copyWARToBuildContext(type: Copy) { // Copy the .war file into the docker directory. from 'build/libs' into 'docker' include '*.war' }

task buildImage(type: DockerBuildTask) { //dependsOn rmImage dependsOn copyWARToBuildContext

dockerHost = localDockerHost imageName = appName //imageName = appName + ":" + appTag

buildContextDirectory = file("./docker/") }

task stopContainer(type: DockerStopTask) { dependsOn buildImage containerId = "ppppp/qqqqqq" }

task rmContainer(type: DockerRmTask) { dependsOn stopContainer containerId = "ppppp/qqqqqq" }

task runContainer(type: DockerRunTask) { dependsOn rmContainer dockerHost = remoteDockerHost imageName = 'ppppp/qqqqqq' tag = "latest" containerConfiguration = [ "ExposedPorts": ["8888": [:], "8080": [:]], "HostConfig" : [ "PortBindings": ["8888": [["HostPort": "8888"]]]]] }

task pullImage(type: DockerPullTask) { //dependsOn pushImage

imageName = 'ppppp/qqqqqq' tag = 'latest' }

/*

task deployToServer(type: DockerPullTask) { imageName = 'ppppp/qqqqqq' tag = "latest" dockerHost = remoteDockerHost authConfigPlain = getDockerClient().readDefaultAuthConfig() } */

parvic303 commented 9 years ago

Trying to run the example with the latest build: FAILURE: Build failed with an exception.

BUILD FAILED

gesellix commented 9 years ago

thanks for the example project, I now got it reproduced. ... stay tuned. =)

gesellix commented 9 years ago

@ageorge303 well, I guess I found it and I'm going to fix it tomorrow - I need to cleanup some code and add some tests.

parvic303 commented 9 years ago

Cool beans. What was the problem? Thanks, Andy

Date: Tue, 5 May 2015 14:13:35 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 well, I guess I found it and I'm going to fix it tomorrow - I need to cleanup some code and add some tests.

— Reply to this email directly or view it on GitHub.

parvic303 commented 9 years ago

Is issue 33 related? Date: Tue, 5 May 2015 14:13:35 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 well, I guess I found it and I'm going to fix it tomorrow - I need to cleanup some code and add some tests.

— Reply to this email directly or view it on GitHub.

gesellix commented 9 years ago

@ageorge303 this issue isn't #33 related, you might check that one if it works for you now.

Regarding this issue, reason was creating the "unix" URL twice, but only once in a manner the URL class accepted. The "unix" protocol in the docker-client is a kind of a hack, so one has to handle it with care. ;-)

gesellix commented 9 years ago

@ageorge303 a new release is available now, please give it a try :)

the new version is 2015-05-06T06-17-42.

parvic303 commented 9 years ago

Awesome. Thanks. Will try in the morning.

Date: Tue, 5 May 2015 22:48:45 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 this issue isn't #33 related, you might check that one if it works for you now.

Regarding this issue, reason was creating the "unix" URL twice, but only once in a manner the URL class accepted. The "unix" protocol in the docker-client is a kind of a hack, so one has to handle it with care. ;-)

— Reply to this email directly or view it on GitHub.

parvic303 commented 9 years ago

Sorry for delay. This is what I got with the May 6th release. 12:36:23.430 [INFO] [de.gesellix.docker.client.DockerClientImpl] using docker at 'unix:///var/run/docker.sock' 12:36:23.448 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] is 'unix' 12:36:23.478 [WARN] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] could not use the 'unix' protocol to connect to /var/run/docker.sock java.net.MalformedURLException: unknown protocol: unix at java.net.URL.(URL.java:413) at java.net.URL.(URL.java:302) at java.net.URL.(URL.java:325) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198) at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getURLWithActualProtocol(DockerURLHandler.groovy:67) at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getRequestUrl(DockerURLHandler.groovy:35) at de.gesellix.docker.client.protocolhandler.DockerURLHandler$getRequestUrl.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124) at de.gesellix.docker.client.LowLevelDockerClient.getRequestUrl(LowLevelDockerClient.groovy:250) at de.gesellix.docker.client.LowLevelDockerClient.openConnection(LowLevelDockerClient.groovy:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at de.gesellix.docker.client.LowLevelDockerClient.request(LowLevelDockerClient.groovy:60) at de.gesellix.docker.client.LowLevelDockerClient$request$1.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at de.gesellix.docker.client.LowLevelDockerClient.post(LowLevelDockerClient.groovy:48) at de.gesellix.docker.client.LowLevelDockerClient$post.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy:137) at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy) at de.gesellix.docker.client.DockerClient$build$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at de.gesellix.gradle.docker.tasks.DockerBuildTask.build(DockerBuildTask.groovy:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 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:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) 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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56) 12:36:23.490 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support 12:36:23.491 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] selected dockerHost at 'unix://socket/var/run/docker.sock' 12:36:23.491 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support 12:36:23.492 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] POST unix://socket/build?rm=true using proxy: DIRECT 12:36:23.515 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] connect via '/var/run/docker.sock'... 12:36:23.517 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] unix socket exists/canRead/canWrite: false/false/false 12:36:23.535 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] mappedLib is libjunixsocket-native-2.0.4.so 12:36:23.536 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL is jar:file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so 12:36:23.536 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL path is file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so 12:36:23.537 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] Extracting 'jar:file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so' to '/tmp/libjunixsocket-native-2.0.43131286097852362962.so' 12:36:23.544 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':buildImage' 12:36:23.544 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :buildImage FAILED 12:36:23.545 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :buildImage (Thread[main,5,main]) completed. Took 0.148 secs. 12:36:23.545 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 3.834 secs, idle: 0.003 secs 12:36:23.562 [LIFECYCLE] [org.gradle.BuildResultLogger] 12:36:23.563 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED 12:36:23.563 [LIFECYCLE] [org.gradle.BuildResultLogger] 12:36:23.563 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 10.621 secs

gesellix commented 9 years ago

ah, well, can you re-run it with the -s parameter? Interesting to me would be the part around the following logs:

[de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] unix socket exists/canRead/canWrite: false/false/false
12:36:23.535 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] mappedLib is libjunixsocket-native-2.0.4.so
12:36:23.536 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL is jar:file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
12:36:23.536 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL path is file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
12:36:23.537 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] Extracting 'jar:file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so' to '/tmp/libjunixsocket-native-2.0.43131286097852362962.so'
12:36:23.544 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':buildImage'
12:36:23.544 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :buildImage FAILED
parvic303 commented 9 years ago

I'm not seeing any of the debug you are expecting to see. I'm obviously running this incorrectly. I'm just doing a sudo ./gradlew buildImage

with this plugin: id "de.gesellix.docker" version "2015-05-06T06-17-42"

gesellix commented 9 years ago

this is my log:

09:58:04.385 [INFO] [de.gesellix.docker.client.DockerClientImpl] using docker at 'unix:///var/run/docker.sock'
09:58:04.388 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] is 'unix'
09:58:04.391 [WARN] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] could not use the 'unix' protocol to connect to /var/run/docker.sock
java.net.MalformedURLException: unknown protocol: unix
  at java.net.URL.<init>(URL.java:413)
  at java.net.URL.<init>(URL.java:302)
  at java.net.URL.<init>(URL.java:325)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
  at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
  at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198)
  at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getURLWithActualProtocol(DockerURLHandler.groovy:67)
  at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getRequestUrl(DockerURLHandler.groovy:35)
  at de.gesellix.docker.client.protocolhandler.DockerURLHandler$getRequestUrl.call(Unknown Source)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
  at de.gesellix.docker.client.LowLevelDockerClient.getRequestUrl(LowLevelDockerClient.groovy:250)
  at de.gesellix.docker.client.LowLevelDockerClient.openConnection(LowLevelDockerClient.groovy:255)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
  at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
  at de.gesellix.docker.client.LowLevelDockerClient.request(LowLevelDockerClient.groovy:60)
  at de.gesellix.docker.client.LowLevelDockerClient$request$1.callCurrent(Unknown Source)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
  at de.gesellix.docker.client.LowLevelDockerClient.post(LowLevelDockerClient.groovy:48)
  at de.gesellix.docker.client.LowLevelDockerClient$post.call(Unknown Source)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
  at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy:137)
  at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy)
  at de.gesellix.docker.client.DockerClient$build.call(Unknown Source)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
  at de.gesellix.gradle.docker.tasks.DockerBuildTask.build(DockerBuildTask.groovy:91)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
  at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
  at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
  at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
  at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
  at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
  at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
  at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
  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:64)
  at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
  at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
  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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
  at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
  at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
  at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
  at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
  at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
  at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
  at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
  at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
  at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
  at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
  at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
  at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
  at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
  at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
  at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
  at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
  at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
  at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
  at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
  at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
  at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47)
  at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)
  at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)
  at org.gradle.util.Swapper.swap(Swapper.java:38)
  at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
  at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70)
  at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)
  at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
  at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46)
  at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
  at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
09:58:04.395 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support
09:58:04.395 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] selected dockerHost at 'unix://socket/var/run/docker.sock'
09:58:04.396 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support
09:58:04.396 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] POST unix://socket/build?rm=true using proxy: DIRECT
09:58:04.398 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] connect via '/var/run/docker.sock'...
09:58:04.399 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] unix socket exists/canRead/canWrite: true/true/true
09:58:04.404 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] mappedLib is libjunixsocket-native-2.0.4.so
09:58:04.404 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL is jar:file:/home/gesellix/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
09:58:04.405 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL path is file:/home/gesellix/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
09:58:04.405 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] Extracting 'jar:file:/home/gesellix/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so' to '/tmp/libjunixsocket-native-2.0.45729084958610093694.so'
09:58:04.409 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@304e82169 pairs: {POST /build?rm=true HTTP/1.1: null}{Content-Type: application/octet-stream}{Cache-Control: no-cache}{Pragma: no-cache}{User-Agent: Java/1.7.0_09}{Host: socket}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}{Content-Length: 145}
09:58:04.421 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@142d3fb04 pairs: {null: HTTP/1.1 200 OK}{Content-Type: application/json}{Date: Sat, 09 May 2015 07:58:04 GMT}{Transfer-Encoding: chunked}
09:58:04.421 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] status: [HTTP/1.1 200 OK]
09:58:04.423 [DEBUG] [de.gesellix.docker.client.LowLevelDockerClient] headers: [transfer-encoding:[chunked], date:[Sat, 09 May 2015 07:58:04 GMT], content-type:[application/json]]
09:58:04.441 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':buildImage'
09:58:04.441 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :buildImage (Thread[Daemon worker Thread 3,5,main]) completed. Took 0.068 secs.
09:58:04.441 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 3,5,main]] finished, busy: 0.102 secs, idle: 0.0 secs
09:58:04.442 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskGraphExecuter] Timing: Executing the DAG took 0.103 secs
09:58:04.442 [LIFECYCLE] [org.gradle.BuildResultLogger] 
09:58:04.442 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD SUCCESSFUL
09:58:04.442 [LIFECYCLE] [org.gradle.BuildResultLogger] 
09:58:04.442 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 0.967 secs
gesellix commented 9 years ago

there are some diffs between our logs:

so, it seems like the extraction into /tmp/libjunixsocket-native-2.0.43131286097852362962.so fails, or something after it.

gesellix commented 9 years ago

@ageorge303 I assume you're still using openjdk 1.8? you're running it with sudo due to the unix socket access rights?

could you run it again like this, please: sudo ./gradlew buildImage -s -d

I would expect to see a stacktrace after the .so lib extraction logs...

gesellix commented 9 years ago

@ageorge303 your sudo environment is also using openjdk 1.8?

gesellix commented 9 years ago

@ageorge303 just as a hint to make the logs or code snippets better readable, you can surround them with triple backticks like this:

any code
gesellix commented 9 years ago

@ageorge303 please try to change the buildImage task to the following (note the from war instead of from 'build/libs':

task copyWARToBuildContext(type: Copy) {
  from war
  into file("./docker/")
  include '*.war'
}
gesellix commented 9 years ago

@ageorge303 did you have a chance to check my latest suggestions? thanks!

parvic303 commented 9 years ago

Hi Tobias,

Sorry, got side-tracked on a different project. Will try today. Thanks again.

Andy Date: Sat, 16 May 2015 12:16:51 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 did you have a chance to check my latest suggestions? thanks!

— Reply to this email directly or view it on GitHub.

gesellix commented 9 years ago

@ageorge303 no problem!

I added another repository to better discuss the failing build. Please give https://github.com/gesellix-docker/gesellix-docker-plugin-issues a try and try to make it fail. I added a quite generic Dockerfile and I guess your Dockerfile is a bit more complex. Reading your recent logs I would suggest to check its contents more exactly - just to be sure :-)

parvic303 commented 9 years ago

It worked!

Date: Sat, 16 May 2015 12:16:51 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 did you have a chance to check my latest suggestions? thanks!

— Reply to this email directly or view it on GitHub.

parvic303 commented 9 years ago

Thanks for all your hard work.

Date: Sat, 16 May 2015 12:16:51 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 did you have a chance to check my latest suggestions? thanks!

— Reply to this email directly or view it on GitHub.

parvic303 commented 9 years ago

Tobias,

The build is successful, and my jar file is created. But still get this in the log:

16:49:52.533 [INFO] [de.gesellix.docker.client.DockerClientImpl] docker build
16:49:52.575 [INFO] [de.gesellix.docker.client.DockerClientImpl] using docker at 'unix:///var/run/docker.sock'
16:49:52.600 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] is 'unix'
16:49:52.636 [WARN] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] could not use the 'unix' protocol to connect to /var/run/docker.sock
java.net.MalformedURLException: unknown protocol: unix
    at java.net.URL.<init>(URL.java:413)
    at java.net.URL.<init>(URL.java:302)
    at java.net.URL.<init>(URL.java:325)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198)
    at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getURLWithActualProtocol(DockerURLHandler.groovy:67)
    at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getRequestUrl(DockerURLHandler.groovy:35)
    at de.gesellix.docker.client.protocolhandler.DockerURLHandler$getRequestUrl.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at de.gesellix.docker.client.LowLevelDockerClient.getRequestUrl(LowLevelDockerClient.groovy:250)
    at de.gesellix.docker.client.LowLevelDockerClient.openConnection(LowLevelDockerClient.groovy:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at de.gesellix.docker.client.LowLevelDockerClient.request(LowLevelDockerClient.groovy:60)
    at de.gesellix.docker.client.LowLevelDockerClient$request$1.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at de.gesellix.docker.client.LowLevelDockerClient.post(LowLevelDockerClient.groovy:48)
    at de.gesellix.docker.client.LowLevelDockerClient$post.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy:137)
    at de.gesellix.docker.client.DockerClientImpl.build(DockerClientImpl.groovy)
    at de.gesellix.docker.client.DockerClient$build$0.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at de.gesellix.gradle.docker.tasks.DockerBuildTask.build(DockerBuildTask.groovy:91)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    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:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
16:49:52.650 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support
16:49:52.652 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] selected dockerHost at 'unix://socket/var/run/docker.sock'
16:49:52.653 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support
16:49:52.654 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] POST unix://socket/build?rm=true using proxy: DIRECT
16:49:52.686 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] connect via '/var/run/docker.sock'...
16:49:52.689 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] unix socket exists/canRead/canWrite: true/true/true
16:49:52.706 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] mappedLib is libjunixsocket-native-2.0.4.so
16:49:52.707 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL is jar:file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
16:49:52.707 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] URL path is file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
16:49:52.708 [DEBUG] [org.scijava.nativelib.BaseJniExtractor] Extracting 'jar:file:/root/.gradle/caches/modules-2/files-2.1/com.kohlschutter.junixsocket/junixsocket-native-common/2.0.4/726bd66a934dea39c817382986496fa4eda96411/junixsocket-native-common-2.0.4.jar!/lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so' to '/tmp/libjunixsocket-native-2.0.45024844927716790550.so'
16:49:52.804 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@783239519 pairs: {POST /build?rm=true HTTP/1.1: null}{Content-Type: application/octet-stream}{Cache-Control: no-cache}{Pragma: no-cache}{User-Agent: Java/1.7.0_79}{Host: socket}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}{Content-Length: 36493895}
16:49:53.614 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@2db8a874 pairs: {null: HTTP/1.1 200 OK}{Content-Type: application/json}{Date: Tue, 19 May 2015 22:49:53 GMT}{Transfer-Encoding: chunked}
16:49:53.615 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] status: [HTTP/1.1 200 OK]
16:49:53.623 [DEBUG] [de.gesellix.docker.client.LowLevelDockerClient] headers: [transfer-encoding:[chunked], date:[Tue, 19 May 2015 22:49:53 GMT], content-type:[application/json]]
16:49:53.709 [INFO] [de.gesellix.gradle.docker.tasks.DockerBuildTask] tag 429c03ccb056 as 'apsd/psb-api'...
16:49:53.710 [INFO] [de.gesellix.docker.client.DockerClientImpl] docker tag
16:49:53.712 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] is 'unix'
16:49:53.715 [WARN] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] could not use the 'unix' protocol to connect to /var/run/docker.sock
java.net.MalformedURLException: unknown protocol: unix
    at java.net.URL.<init>(URL.java:413)
    at java.net.URL.<init>(URL.java:302)
    at java.net.URL.<init>(URL.java:325)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198)
    at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getURLWithActualProtocol(DockerURLHandler.groovy:67)
    at de.gesellix.docker.client.protocolhandler.DockerURLHandler.getRequestUrl(DockerURLHandler.groovy:35)
    at de.gesellix.docker.client.protocolhandler.DockerURLHandler$getRequestUrl.call(Unknown Source)
    at de.gesellix.docker.client.LowLevelDockerClient.getRequestUrl(LowLevelDockerClient.groovy:250)
    at de.gesellix.docker.client.LowLevelDockerClient.openConnection(LowLevelDockerClient.groovy:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at de.gesellix.docker.client.LowLevelDockerClient.request(LowLevelDockerClient.groovy:60)
    at de.gesellix.docker.client.LowLevelDockerClient$request$1.callCurrent(Unknown Source)
    at de.gesellix.docker.client.LowLevelDockerClient.post(LowLevelDockerClient.groovy:48)
    at de.gesellix.docker.client.LowLevelDockerClient$post.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at de.gesellix.docker.client.DockerClientImpl.tag(DockerClientImpl.groovy:151)
    at de.gesellix.docker.client.DockerClient$tag$1.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at de.gesellix.gradle.docker.tasks.DockerBuildTask.build(DockerBuildTask.groovy:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    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:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
16:49:53.718 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support
16:49:53.719 [DEBUG] [de.gesellix.docker.client.protocolhandler.DockerURLHandler] selected dockerHost at 'unix://socket/var/run/docker.sock'
16:49:53.719 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.UnixSocketURLStreamHandler] initialize unix protocol support
16:49:53.719 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] POST unix://socket/images/429c03ccb056/tag?repo=apsd%2Fpsb-api&tag=&force=true using proxy: DIRECT
16:49:53.720 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] connect via '/var/run/docker.sock'...
16:49:53.721 [DEBUG] [de.gesellix.docker.client.protocolhandler.urlstreamhandler.HttpOverUnixSocketClient] unix socket exists/canRead/canWrite: true/true/true
16:49:53.722 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@1b2277d17 pairs: {POST /images/429c03ccb056/tag?repo=apsd%2Fpsb-api&tag=&force=true HTTP/1.1: null}{Cache-Control: no-cache}{Pragma: no-cache}{User-Agent: Java/1.7.0_79}{Host: socket}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
16:49:53.729 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@73e848414 pairs: {null: HTTP/1.1 201 Created}{Date: Tue, 19 May 2015 22:49:53 GMT}{Content-Length: 0}{Content-Type: text/plain; charset=utf-8}
16:49:53.730 [INFO] [de.gesellix.docker.client.LowLevelDockerClient] status: [HTTP/1.1 201 Created]
16:49:53.731 [DEBUG] [de.gesellix.docker.client.LowLevelDockerClient] headers: [date:[Tue, 19 May 2015 22:49:53 GMT], content-length:[0], content-type:[text/plain; charset=utf-8]]
16:49:53.739 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':buildImage'
16:49:53.740 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :buildImage (Thread[main,5,main]) completed. Took 1.214 secs.
16:49:53.740 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 5.011 secs, idle: 0.003 secs
16:49:53.740 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskGraphExecuter] Timing: Executing the DAG took 5.02 secs
16:49:53.742 [LIFECYCLE] [org.gradle.BuildResultLogger] 
16:49:53.743 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD SUCCESSFUL
16:49:53.743 [LIFECYCLE] [org.gradle.BuildResultLogger] 
16:49:53.743 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 11.673 secs
16:49:53.744 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
16:49:53.745 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
16:49:53.746 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for settings file '/home/ageorge/repos/psb-api/src/generated/server/settings.gradle' (/root/.gradle/caches/2.2.1/scripts/settings_agtirgjt5scpvjfshm7dszsy9/SettingsScript/buildscript).
16:49:53.747 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for settings file '/home/ageorge/repos/psb-api/src/generated/server/settings.gradle' (/root/.gradle/caches/2.2.1/scripts/settings_agtirgjt5scpvjfshm7dszsy9/SettingsScript/no_buildscript).
16:49:53.747 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file '/home/ageorge/repos/psb-api/src/generated/server/build.gradle' (/root/.gradle/caches/2.2.1/scripts/build_3iygl6bfhndhod7r3zbjfa61n/ProjectScript/buildscript).
16:49:53.748 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/home/ageorge/repos/psb-api/src/generated/server/build.gradle' (/root/.gradle/caches/2.2.1/scripts/build_3iygl6bfhndhod7r3zbjfa61n/ProjectScript/no_buildscript).
16:49:53.750 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileSnapshots.bin (/home/ageorge/repos/psb-api/src/generated/server/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin)
16:49:53.750 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskArtifacts.bin (/home/ageorge/repos/psb-api/src/generated/server/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin)
16:49:53.751 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFileStates.bin (/home/ageorge/repos/psb-api/src/generated/server/.gradle/2.2.1/taskArtifacts/outputFileStates.bin)
16:49:53.751 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (/home/ageorge/repos/psb-api/src/generated/server/.gradle/2.2.1/taskArtifacts/fileHashes.bin)
16:49:53.752 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (/home/ageorge/repos/psb-api/src/generated/server/.gradle/2.2.1/taskArtifacts).
16:49:53.753 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache plugin-use-metadata.bin (/root/.gradle/caches/2.2.1/plugin-resolution/plugin-use-metadata.bin)
16:49:53.753 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Plugin Resolution Cache (/root/.gradle/caches/2.2.1/plugin-resolution).
16:49:53.756 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (/root/.gradle/caches/modules-2/metadata-2.14/module-metadata.bin)
16:49:53.756 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (/root/.gradle/caches/modules-2/metadata-2.14/artifact-at-repository.bin)
16:49:53.757 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/root/.gradle/caches/modules-2).
16:49:53.757 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedRepositoryFactory] In-memory dependency metadata cache closed. Repos cached: 1, cache instances: 1, modules served from cache: 0, artifacts: 0
16:49:53.760 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
16:49:53.760 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolved configuration cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
16:49:53.761 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.001 secs

Date: Sat, 16 May 2015 12:16:51 -0700 From: notifications@github.com To: gradle-docker-plugin@noreply.github.com CC: andrewgeorge1@hotmail.com Subject: Re: [gradle-docker-plugin] buildImage fails with unknown protocol error (#31)

@ageorge303 did you have a chance to check my latest suggestions? thanks!

— Reply to this email directly or view it on GitHub.

gesellix commented 9 years ago

@ageorge303 well, great that it works now :+1: :-)

The stacktrace is a part of my increased debug log to find reasons for the build problem. I'll remove the stacktrace from the logs with the next release. As a side note: the current implementation has a fallback to manually load necessary classes to add unix socket support to the runtime. It's the underlying error shown by the stacktrace which triggers the fallback mechanism.

So, have fun with Docker and if you still encounter any issues, just add another issue.