spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.67k stars 575 forks source link

com.spotify:docker-maven-plugin:0.4.9:build (default-cli) on project eureka-server: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] #275

Closed santhoshanna closed 6 years ago

santhoshanna commented 8 years ago

Description

[Add feature/bug description here]

How to reproduce

[Add steps on how to reproduce this issue] The Maven Plugin portion is :+1:

com.spotify docker-maven-plugin 0.4.9 https://192.168.99.101:2376 ${docker.image.prefix}/${project.artifactId} src/main/docker ${project.build.directory} ${project.build.finalName}.jar

When i run docker-machine ls i get below response: C:\Users\cups>docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Running tcp://192.168.99.101:2376 v1.11.1 proxy - virtualbox Stopped Unknown proxymachine - virtualbox Stopped Unknown

I am using windows 7(64 bit). C:\Users\cups>docker-machine --version docker-machine version 0.7.0, build a650a40

C:\Users\cups>docker --version Docker version 1.11.1, build 5604cbe

virtual box version is 5.1.6

What do you expect

[Describe what do you expect to happen]

What happened instead

[Describe the actual results]

Software:

com.spotify:docker-maven-plugin:0.4.9:build (default-cli) on project eureka-server: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

mattnworb commented 8 years ago

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

sounds like an issue with TLS certificates - are you setting the environment variables that docker-machine exports? see https://github.com/spotify/docker-client/blob/master/docs/user_manual.md#https-support

santhoshanna commented 8 years ago

I did that, but it did not help: C:\Users\cups>docker-machine env default SET DOCKER_TLS_VERIFY=1 SET DOCKER_HOST=tcp://192.168.99.100:2376 SET DOCKER_CERT_PATH=C:\Users\cups.docker\machine\machines\default SET DOCKER_MACHINE_NAME=default REM Run this command to configure your shell: REM @FOR /f "tokens=*" %i IN ('docker-machine env default') DO @%i

C:\Users\cups>@FOR /f "tokens=*" %i IN ('docker-machine env default') DO @%i

Also i upgraded the docker version: C:\Users\cups>docker version Client: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 23:54:00 2016 OS/Arch: windows/amd64

But these do not seem to help.

Also how do i use the api you mentioned?? I tried setting:

https://boot2docker:2376 but i get unknowhost exception..
santhoshanna commented 8 years ago

Sorry, this is how my pom.xml looks:

com.spotify docker-maven-plugin 0.4.13 https://boot2docker:2376 ${docker.image.prefix}/${project.artifactId} src/main/docker ${project.build.directory} ${project.build.finalName}.jar
santhoshanna commented 8 years ago

pom.txt

Please find attached my pom.xml.. I am currently using latest version of spotify plugin 0.4.13

vishwaraja commented 7 years ago

I have the same issue too, though the context is set with the right environment variables for the plugin.

davidxia commented 6 years ago

Is this still an issue?

davidxia commented 6 years ago

Closing for now. Please comment here if the latest version doesn't work.