Comments (18)
Upgrading to the latest docker-java might already yield better results
from docker-it-scala.
@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.
@viktortnk Have you found an upstream ticket on this? Otherwise I will create one.
from docker-it-scala.
@francisdb No, sorry. Didn't check any
from docker-it-scala.
I reported it upstream: docker-java/docker-java#419
from docker-it-scala.
Seems that without a PR this will not be solved in the near future
from docker-it-scala.
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.
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.
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.
Sorry @akauppi I'm not sure I'm entirely understand what you are proposing
from docker-it-scala.
@viktortnk could try docker-java-3.0.0-RC1 as docker-java/docker-java#419 has been fixed
from docker-it-scala.
There is already build against this version on maven central. 0.7.0-RC1
from docker-it-scala.
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.
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.
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.
Want me to create a new issue?
from docker-it-scala.
seems to be related to docker-java/docker-java#537 and somehow #33
from docker-it-scala.
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)
- Concurrency issues on logs
- No support for UDP?
- Timeout or Race condition resulting in Cannot run all required containers HOT 1
- Shutdown connection before running tests HOT 1
- Pulling image timeout gives an error message about not being able to pull windows image
- Publish v0.9.7 for 2.11 ? HOT 1
- Plans to publish a jar with shaded spotify docker-client? HOT 8
- Setup steps unclear HOT 2
- PostgresServiceSpec fails with driver libraries from 42 HOT 1
- Allow pausing/unpausing of containers in DockerExecutor
- Release for Scala 2.13 HOT 5
- run unpublished docker image with whisk labs docker-it-scala HOT 1
- Incompatible with ScalaTest's AsyncTestSuite
- Issues with SBT 1.3.x
- An image without a tag pulls all tags
- Persisting container across multiple test classes
- withUnlinkedDependencies not starting dependent container
- DockerContainer should have an option to configure withIpv6Address and withExtraHosts
- Missing release for docker-testkit-impl-docker-java 0.11.0 HOT 5
- Update in the GitHub Actions image's docker breaks docker-it-scala HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-it-scala.