Coder Social home page Coder Social logo

Comments (18)

francisdb avatar francisdb commented on July 24, 2024

Upgrading to the latest docker-java might already yield better results

from docker-it-scala.

viktortnk avatar viktortnk commented on July 24, 2024

@francisdb I've just upgraded to 2.1.4. Unfortunately it doesn't provide any better error message. I think it is up to docker-java to report about lack of DOCKER_HOST or DOCKER_URL.

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

@viktortnk Have you found an upstream ticket on this? Otherwise I will create one.

from docker-it-scala.

viktortnk avatar viktortnk commented on July 24, 2024

@francisdb No, sorry. Didn't check any

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

I reported it upstream: docker-java/docker-java#419

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

Seems that without a PR this will not be solved in the near future

from docker-it-scala.

TimSoethout avatar TimSoethout commented on July 24, 2024

Any workarounds for now? I'm running into this error but I did specify DOCKER_HOST. It also seems to pick this up (with http://), but somehow still I get this error.

from docker-it-scala.

TimSoethout avatar TimSoethout commented on July 24, 2024

This seems to do something

override implicit val docker : Docker =
    new Docker(DockerClientConfig.createDefaultConfigBuilder()
      .withUri("http://192.168.59.103:2375")
      .withSSLConfig(null)
      .build())

If I do println("CONTAINERS: " + docker.client.listContainersCmd().exec()) it work.
But my C* docker is not started (nor any request for it received by the docker host)

from docker-it-scala.

akauppi avatar akauppi commented on July 24, 2024

I get repeatedly bitten by this. I understand the project's point that docker-java should fix it, but at the same time it's not difficult to do it here (would take one .sbt file that can be removed when upstream checking is there). Would you use such if I craft one?

from docker-it-scala.

viktortnk avatar viktortnk commented on July 24, 2024

Sorry @akauppi I'm not sure I'm entirely understand what you are proposing

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

@viktortnk could try docker-java-3.0.0-RC1 as docker-java/docker-java#419 has been fixed

from docker-it-scala.

viktortnk avatar viktortnk commented on July 24, 2024

There is already build against this version on maven central. 0.7.0-RC1

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

Ok, with this build I get the following when docker is not running:

com.github.dockerjava.api.exception.DockerClientException: Certificate path (DOCKER_CERT_PATH) '/Users/me/.docker/certs' doesn't exist. (DockerClientConfig.java:112)

which at least points to docker so I guess we can consider this ticket closed 👍

(everything works by default with the docker quickstart terminal om OSX)

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

Hmm, now our jenkins build on Ubuntu fails when setting
export DOCKER_HOST=unix:///var/run/docker.sock

see docker-java/docker-java#480

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

Next issue, this time on the docker-it-scala side

with DOCKER_TLS_VERIFY=0 and export DOCKER_HOST=unix:///var/run/docker.sock I now have this

ERROR com.whisk.docker.DockerContainer - java.lang.IllegalArgumentException: protocol = http host = null
java.lang.RuntimeException: java.lang.IllegalArgumentException: protocol = http host = null
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1453) ~[na:1.8.0_25]
    at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90) ~[na:1.8.0_25]
    at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1431) ~[na:1.8.0_25]
    at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1429) ~[na:1.8.0_25]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_25]
    at java.security.AccessController.doPrivileged(AccessController.java:713) ~[na:1.8.0_25]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1428) ~[na:1.8.0_25]
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2965) ~[na:1.8.0_25]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489) ~[na:1.8.0_25]
    at com.whisk.docker.DockerReadyChecker$HttpResponseCode$$anonfun$apply$9$$anonfun$apply$1.apply$mcZ$sp(DockerReadyChecker.scala:85) ~[docker-testkit-core_2.11-0.7.0-RC1.jar:0.7.0-RC1]
    at com.whisk.docker.DockerReadyChecker$HttpResponseCode$$anonfun$apply$9$$anonfun$apply$1.apply(DockerReadyChecker.scala:82) ~[docker-testkit-core_2.11-0.7.0-RC1.jar:0.7.0-RC1]
    at com.whisk.docker.DockerReadyChecker$HttpResponseCode$$anonfun$apply$9$$anonfun$apply$1.apply(DockerReadyChecker.scala:82) ~[docker-testkit-core_2.11-0.7.0-RC1.jar:0.7.0-RC1]

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

Want me to create a new issue?

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

seems to be related to docker-java/docker-java#537 and somehow #33

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

Meanwhile using 0.9.0-M5 this returns a different error (Could not find library in classpath, tried: [libjunixsocket-macosx-1.8-x86_64.dylib, libjunixsocket-macosx-1.5-x86_64.dylib]) and a workaround is to add this to your tests:

override implicit val dockerFactory: DockerFactory = new SpotifyDockerFactory(DefaultDockerClient.fromEnv().build())

see https://github.com/whisklabs/docker-it-scala#docker-for-mac-setup

Better to check the upstream issue for fixes

from docker-it-scala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.