-
Notifications
You must be signed in to change notification settings - Fork 288
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
Excon::Errors::SocketError: end of file reached (EOFError) #202
Comments
This could be due to an API update. Right now the latest docker-api works for 1.12, specified here. We may have to vet the new API version and see what's changed. |
I think the relevant change is described in the Docker API Docs:
Excon should somehow use the certificates in Edit: Excon is able to handle certificates: https://github.com/excon/excon#https-client-certificate. I'll give that a try. |
Got it running on boot2docker: Set the url scheme of DOCKER_HOST=https://boot2docker:2376 Then set the following options: cert_path = File.expand_path ENV['DOCKER_CERT_PATH']
Docker.options = {
client_cert: File.join(cert_path, 'cert.pem'),
client_key: File.join(cert_path, 'key.pem')
}
Excon.defaults[:ssl_ca_file] = File.join(cert_path, 'ca.pem')
|
I've run into this issue as well, I tried setting the following when the options are passed to the Excon resource in {
:client_cert => '/Users/stevenjack/.docker/boot2docker-vm/cert.pem',
:client_key => '/Users/stevenjack/.docker/boot2docker-vm/key.pem',
:ssl_ca_file => '/Users/stevenjack/.docker/boot2docker-vm/ca.pem',
:ssl_verify_peer => false
} but still getting the {
:client_cert => '/Users/stevenjack/.docker/boot2docker-vm/cert.pem',
:client_key => '/Users/stevenjack/.docker/boot2docker-vm/key.pem',
:ssl_ca_file => '/Users/stevenjack/.docker/boot2docker-vm/ca.pem',
:ssl_verify_peer => false,
:ssl_versions => :TLSv1_2
} but still getting the issue.. @neckhair did you have any luck? |
@neckhair Ah I hadn't refreshed the page so I didn't see you'd got it working, awesome! |
@neckhair it works for me too, but if you set the DOCKER_HOST=https://boot2docker:2376 then the standard docker daemon doesn't work: 2014/10/25 18:23:35 Invalid bind address protocol: https://192.168.59.103:2376 Need to think of the best way around this.. |
If you guys have a working certificate-based setup, can I ask one of you to provide some documentation that we can put in the README? Specifically about which options are needed to pass to Excon. Undoubtedly people are going to be looking for this and if we can provide the right set of options for Excon, I'm sure it'll help a lot! |
Basically it works with my settings from above. You can pass in the DOCKER_HOST=https://boot2docker:2376 bundle exec rails server I know that's not very usefull in all cases. Isn't there a way to get Excon working with a "tcp://" URL? |
It works now. In my Rails app I've got the following initializer ( cert_path = File.expand_path ENV['DOCKER_CERT_PATH']
Docker.options = {
client_cert: File.join(cert_path, 'cert.pem'),
client_key: File.join(cert_path, 'key.pem'),
ssl_ca_file: File.join(cert_path, 'ca.pem'),
scheme: 'https' # This is important when the URL starts with tcp://
} That works with $ echo $DOCKER_HOST
tcp://192.168.59.103:2376 |
@neckhair perfect! That makes much more sense |
👍 |
I have this set, but getting this error:
|
@joelmoss: That is because the certificated that you use (and also boot2docker uses) are not signed by trusted CA. You can fix it by placing |
The text was updated successfully, but these errors were encountered: