-
Notifications
You must be signed in to change notification settings - Fork 573
Remote docker-host and non-SSL-setup #183
Comments
Looks like the issue is that |
v0.3.7 seem to also have the problem. It'd be nice to know what is the latest version that does't have the problem. |
+1 |
To use docker:build on my local workstation with a docker daemon not using TLS, I temporarily renamed the folder " Surprise: I got a BUILD SUCCESS! This would confirm mattnworb 's hypothesis. Obviously not a very practical solution but an interesting result. |
@mattnworb Any workaround for this? I'm coming from #221 and #222 |
@laurent-opnworks what version were you using? I tried your workaround and did not get anywhere... |
@marcellodesales I believe it was docker v1.10 and docker-maven-plugin v0.3.258 but I have not pursued my investigations since then. Still hoping/waiting for a "real" solution. |
@mattnworb How does #216 look as a solution? It seems pretty good to me. |
@laurent-opnworks do you have files in this path even though your docker daemon does not use TLS? |
On the other hand, this check in docker-client doesn't really need to be there if ((builder.dockerCertificates != null) && !originalUri.getScheme().equals("https")) {
throw new IllegalArgumentException(
"An HTTPS URI for DOCKER_HOST must be provided to use Docker client certificates");
} as the class takes care elsewhere not to assume that |
Sorry, my previous comment is false. DefaultDockerClient uses the presence of the This seems like a fair assumption to make since the DOCKER_HOST format generally starts with Another way for the DefaultDockerClient to tell if it should use It might make more sense to add a flag like But for a workaround today, you could remove the certs in |
@mattnworb I'm thinking how this would work in a CI server... Changing the |
Any progress on this? Setting docker server to HTTP doesn't seem like a legitimate "solution". Why can't the client connect to the unix socket as configured? I happen to be working in an environment where changing the docker server is not a long time solution. |
I have the same issue of "com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? " Any idea how to fix? |
Ensure that directory |
@jarmoni hey why the /.docker folder should not exist? And even after i delete this folder, there are some other issues like "Caused by: java.net.SocketException: Connection reset by peer: socket write error" Thanks! |
If the folder exists, the plugin assumes that you want to use SSL. Don't blame me for this behaviour, I am just the original reporter of the issue (1,5 years ago...) ;-)
and then in same terminal:
|
@jarmoni Thanks for the quick reply! I have been trapped in this issue for quite a while. I use docker for windows and i already set the env virables for DOCKER_HOST(DOCKER_HOST=tcp://localhost:2375) and DOCKER_CERT_PATH. If I dont have DOCKER_CERT_PATH, it will end up with "Caused by: java.net.SocketException: Connection reset by peer: socket write error". If it has DOCKER_CERT_PATH, it will end up with "javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?" Any ideas? |
I'm sorry, I have no expirience with docker on Windows. On Linux the above should work. |
thanks! i may try on a linux system to see whether it is working! |
But I would assume that If you don't want to use SSL/TLS the variable
.... where localdocker1 is a Vagrant-box running on my local machine. |
But it is quite simple: If the common commands ( |
This usually points to the thing you are connecting to closing the connection (sending a RST) when your client tries to establish the connection. I am not familiar at all with Docker for Windows either but you might want to doublecheck that it is actually listening on port 2375. |
@jarmoni Hi I can build the image through Docker using command "docker build " and can run container successfully. Only the plugin for build is not working, let alone for pushing to the repository. @mattnworb Hi thank you for your reply! I did check the process on 2375. It is docker.proxy listening on port 2375.
Any ideas? I try to search for help in the docker for windows size but no luck. |
@sherryhw Did you already check what happens on the network when you...
In Unix-systems |
Hello everybody. INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:2375: Connection reset by peer: socket write error So it is strange error because I really use So in my understanding it should try to reach tcp instead of http? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
originally,I set-up the toolbox in my local machine,it is ok to build the image to the local docker,then I try to build images to the remote docker,it showed "Unrecognized SSL message, plaintext?" After I deleted the env-var "DOCKER_CERT_PATH",and then it works.Maybe the toolbox set some env-var about docker automatically cause this issue |
I exported environment-variable DOCKER_HOST as described (Port 2375 -> no SSL):
This worked for months in version 0.2.11 but in 0.4.0 it seems to be broken. The plugin tries to connect via SSL and this (of course) fails:
When I set config-property 'dockerHost' in the plugin's config
<dockerHost>tcp://192.168.33.10:2375</dockerHost>
, I get:There are no additional env-variables like DOCKER_CERT_PATH or DOCKER_TLS_VERIFY exported in my environment. So I don't know why the plugin assumes that I use SSL
The text was updated successfully, but these errors were encountered: