-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed #890
Comments
I think I'm experiencing the same thing trying to use the
But
I'm on OSX, running all the same versions as @gkostyanikov, except my Go client version is Edit: Actually it looks like Homebrew doesn't link openssl, so I'm using the default OSX version: |
The issue was Homebrew python.
|
@adambiggs Your solution works! Thanks! |
This worked for me too, I'm using a brand new mac and set it up with homebrew python. Had this error with fig communicating with docker. Followed @adambiggs advice verbatim and got past my blocker, it could be a python version issue too but regardless I guess this machine will be using system python for awhile. |
This is happening on me too. And I don't want to use the system's python, anyone have another workaround? |
Have you tried using the binary? Do you get the same problem? |
No I haven't tried the binary. mkvirtualenv --python=/usr/bin/python docker-compose
pip install docker-compose==1.1.0-rc2 |
Found a better solution using http://stackoverflow.com/a/28216459/1166293 Edit: Nevermind, |
What caused this error for me was that the home-brew openssl was not linked to /usr/local/bin/openssl.
returned OpenSSL 0.9.8zc 15 Oct 2014 not OpenSSL 1.0.1j 15 Oct 2014 Running
and reinstalling fig resolved the issue. |
Interesting, however my OpenSSL version is OpenSSL 1.0.1j 15 Oct 2014 |
@aanand in my case the binary does not have this problem. |
I got this error when I had fig installed through pip, not homebrew. |
+1 for @NotBobTheBuilder solution, also worked for me |
👍 for @NotBobTheBuilder |
@NotBobTheBuilder nice solution for fig but docker-compose isn't available on homebrew yet unfortunately. |
@ocasta what about this scary-sounding warning from homebrew about linking OpenSSL?
|
Thumbs up @NotBobTheBuilder - That fixed it with me as well. |
anyone know the source of this problem? it's happening to me with fig. I prefer to stick to |
My system OpenSSL is ...I am guessing it broke when I upgraded to Python 2.7.9, there seem some SSL related bugs with it... looks a lot like this: |
running |
Does fig need updating to work around the SSL changes in Py 2.7.9? |
I'm using boot2docker. I just upgraded to 1.5.0 but no change.
The fig code looks correct, it is attempting to use the certs installed by boot2docker... I assume these certs are ok because they always used to work and I just upgraded b2d so they shouldn't have expired. |
Hmm, my Python (installed via homebrew) appears to be using the homebrew version of OpenSSL though:
...running |
I tried a previously installed version of python (2.7.8_2) via Then I tried switching to an older openssl version, from 1.0.2 to 1.0.1j_1 which seems to work. $ python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.0.2 22 Jan 2015
$ docker-compose ps
SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
$ brew switch openssl 1.0.1j_1
$ python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.0.1j 15 Oct 2014
$ docker-compose ps
Name Command State Ports
------------------------------ |
For me I just get a different error, but maybe it helps narrow down what's wrong:
Switching back to OpenSSL 1.0.2 produces the previous |
One workaround is to run docker-compose in a container: git clone git@github.com:docker/fig.git
cd fig
docker build --tag docker-compose .
alias docker-compose='docker run --rm -e "DOCKER_TLS_VERIFY=$DOCKER_TLS_VERIFY" -e DOCKER_HOST=tcp://172.17.42.1:2376 -e DOCKER_CERT_PATH=/usr/local/certs -v "$DOCKER_CERT_PATH:/usr/local/certs" -v "$PWD:/code" docker-compose --project-name "${PWD##*/}"' This requires exposing port 2376 in VirtualBox: VBoxManage controlvm boot2docker-vm natpf1 "docker-s,tcp,127.0.0.1,2376,,2376" |
@kretz's answer worked for me. |
+1 @kretz brew switch openssl 1.0.1j_1 |
@jmmills huh… same here. Maybe python treats set-as-empty differently to unset? Mac OS, homebrew docker-compose and docker-machine, using system python. Newly created machine with:
|
I've had the exact same - |
It definitely smells like an upstream bug, my guess would be some environment compatibility code for curl, in which "defined" and "empty" are being treated differently. Thanks,
|
Only seems to affect the homebrew version - installing homebrew Python then installing docker-compose via pip solves all the errors.
|
I believe I pasted replication of the issue in Linux earlier. I can double check tomorrow when at a workstation Thanks,
|
Same problem here since i updated docker-compose to version 1.7 using brew.
Emptying the CURL_CA_BUNDLE env var kind of solves the problem :
Downgrading to 1.6.2 also solves the problem.
|
Rather than disable the CURL_CA_BUNDLE you can run using: |
I'm probably not the first one who may have brought this up, but isn't it counter intuitive that a curl environment variable have any effect what so ever on an unrelated Python application? Thanks,
|
I ran into this issue and the problem was with the environment variable REQUESTS_CA_BUNDLE pointing to a custom location for self-signed certs. Encase this helps anyone.
|
@aboutlo This works - it did not work with other |
Uninstalling ndg-httpsclient (with pip - was version 0.4.0) solved the issue for me, see my post here: #3365 |
I debugged docker-compose and docker-py and figured out that you should either use environment variables or options in command. You should not mix these . If you even specify --tls in command then you will have to specify all the options as the TLSConfig object, as now TLSConfig object is created completely from the command options and operide the TFSConfig object created from the environment variable. |
@m-housh OMG thanks for that tip! Exact same thing happened to me! Removed |
I have encountered the same problem. First I though it is because the OpenSSL version differences (Pyhton had 1.0.2 but OS had 0.9.8) I made them both 1.0.2 but it still did not work. Follow these steps please:
Check if this certificate is really the certificate from your computer. If not just copy yours in to this file and save it. Then just run:
This worked for me and hope that it helps. |
Issue grooming: There appears to be a variety of different failure modes and user error/misconfiguration scenarios (all largely historic) described here. I'm not seeing anything which seems to point towards an active ongoing issue in compose, so I'm closing the issue. If you are still seeing a related error with modern versions then please open a fresh issue with full details of your scenario etc. |
the tests on windows don't pass yet, but at least it compiles
the tests on windows don't pass yet, but at least it compiles
the tests on windows don't pass yet, but at least it compiles
the tests on windows don't pass yet, but at least it compiles
the tests on windows don't pass yet, but at least it compiles
… subject is different from `cert.pem` subject to work-around OpenSSL bug. Signed-off-by: Matt Bogosian <mtb19@columbia.edu>
Got this error on both machines almost at the same time with docker-compose and lately with fig after rollback. A few search results points to python/openssl issue but i simple can't figure out where to dig to. Python/openssl comes from homebrew.
Boot2Docker-cli version: v1.4.1
Git commit: 43241cb
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.4
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8
The text was updated successfully, but these errors were encountered: