# Excon::Errors::SocketError Unable to verify certificate

**URL:** <https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123>\
**Category:** Chef Infra (archive)\
**Created:** [June 21, 2013, 7:24pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123 "2013-06-21T19:24:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kallen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallen/32/1049_2.png) [@Kallen](https://discourse.chef.io/u/Kallen)\
**Post date:** [June 21, 2013, 7:24pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123/1 "2013-06-21T19:24:03Z")

</div>

My newly launched nodes started failing in their route53 recipe last nite with  
this error:

FATAL: Excon::Errors::SocketError:  
route53\_record[[chef-ci-web.dev.needtogetmyoontzon.com](http://chef-ci-web.dev.needtogetmyoontzon.com)]  
(resolver::default line 128) had an error: Excon::Errors::SocketError:  
Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or  
`Excon.defaults[:ssl_verify_peer] = false` (less secure).

On such a system, I see:

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.25.0

On a system launched only a couple days ago, I see

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.24.0

I see 0.25.0 changed the behavior of how it finds certs:

> <https://github.com/excon/excon/blob/master/changelog.txt>

I’m not sure if I should bug geemus, or the chef community. In the meantime,  
I’m gonna see if I can pin my clients to 0.24.0 so we’re not stuck on this.

kallen

---

<div class="post-metadata">

**Author:** ![Kallen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallen/32/1049_2.png) [@Kallen](https://discourse.chef.io/u/Kallen)\
**Post date:** [June 21, 2013, 7:50pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123/2 "2013-06-21T19:50:35Z")

</div>

On Fri, 21 Jun 2013, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:

> My newly launched nodes started failing in their route53 recipe last nite with  
> this error:
> 
> FATAL: Excon::Errors::SocketError:  
> route53\_record[[chef-ci-web.dev.needtogetmyoontzon.com](http://chef-ci-web.dev.needtogetmyoontzon.com)]  
> (resolver::default line 128) had an error: Excon::Errors::SocketError:  
> Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or  
> `Excon.defaults[:ssl_verify_peer] = false` (less secure).
> 
> On such a system, I see:
> 
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.25.0
> 
> On a system launched only a couple days ago, I see
> 
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.24.0
> 
> I see 0.25.0 changed the behavior of how it finds certs:  
> [excon/changelog.txt at master · excon/excon · GitHub](https://github.com/geemus/excon/blob/master/changelog.txt)
> 
> I'm not sure if I should bug geemus, or the chef community. In the meantime,  
> I'm gonna see if I can pin my clients to 0.24.0 so we're not stuck on this.

I was able to prevent excon 0.25.0 from being installed, and instead install  
excon 0.24.0 by calling this early in my run\_list:

```
chef_gem "excon" do
  version "0.24.0"
end

```

fwiw.

My deets:

AWS Linux 2012.09, chef 10.24.0

---

<div class="post-metadata">

**Author:** ![Lamont\_Granquist\_OLD](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@Lamont\_Granquist\_OLD](https://discourse.chef.io/u/Lamont_Granquist_OLD)\
**Post date:** [June 21, 2013, 9:16pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123/3 "2013-06-21T21:16:22Z")

</div>

It looks like excon is now searching for an openssl.cnf, and omnibus  
ships with the example openssl.cnf which openssl installs by default in  
the omnibus build at /opt/chef/embedded/ssl/openssl.cnf -- and when it  
finds that file it goes off and does something using incorrect  
information that isn't entirely clear to me...

Since the start of openssl.cnf begins with a comment about "This is  
mostly being used for generation of certificate requests." it isn't  
clear to me why a client app expects to get something useful out of  
that. But it also isn't clear to me why openssl isn't installing that  
as openssl.cnf.example or something.

AFAIK, we could remove that out of the omnibus build and then I think it  
will fall back to the DEFAULT\_CA\_FILE in the omnibus build correctly...

If you manually nuke that file does excon 0.25.0 work correctly?

On 6/21/13 12:50 PM, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:

> On Fri, 21 Jun 2013, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> 
> > My newly launched nodes started failing in their route53 recipe last nite with  
> > this error:
> > 
> > FATAL: Excon::Errors::SocketError:  
> > route53\_record[[chef-ci-web.dev.needtogetmyoontzon.com](http://chef-ci-web.dev.needtogetmyoontzon.com)]  
> > (resolver::default line 128) had an error: Excon::Errors::SocketError:  
> > Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or  
> > `Excon.defaults[:ssl_verify_peer] = false` (less secure).
> > 
> > On such a system, I see:
> > 
> > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.25.0
> > 
> > On a system launched only a couple days ago, I see
> > 
> > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.24.0
> > 
> > I see 0.25.0 changed the behavior of how it finds certs:  
> > [excon/changelog.txt at master · excon/excon · GitHub](https://github.com/geemus/excon/blob/master/changelog.txt)
> > 
> > I'm not sure if I should bug geemus, or the chef community. In the meantime,  
> > I'm gonna see if I can pin my clients to 0.24.0 so we're not stuck on this.  
> > I was able to prevent excon 0.25.0 from being installed, and instead install  
> > excon 0.24.0 by calling this early in my run\_list:
> 
> ```
> chef_gem "excon" do
> version "0.24.0"
> end
> 
> ```
> 
> fwiw.
> 
> My deets:
> 
> AWS Linux 2012.09, chef 10.24.0

---

<div class="post-metadata">

**Author:** ![Kallen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallen/32/1049_2.png) [@Kallen](https://discourse.chef.io/u/Kallen)\
**Post date:** [June 21, 2013, 9:41pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123/4 "2013-06-21T21:41:08Z")

</div>

On Fri, 21 Jun 2013, Lamont Granquist wrote:

> It looks like excon is now searching for an openssl.cnf, and omnibus  
> ships with the example openssl.cnf which openssl installs by default  
> in the omnibus build at /opt/chef/embedded/ssl/openssl.cnf -- and  
> when it finds that file it goes off and does something using  
> incorrect information that isn't entirely clear to me...
> 
> Since the start of openssl.cnf begins with a comment about "This is  
> mostly being used for generation of certificate requests." it isn't  
> clear to me why a client app expects to get something useful out of  
> that. But it also isn't clear to me why openssl isn't installing  
> that as openssl.cnf.example or something.
> 
> AFAIK, we could remove that out of the omnibus build and then I  
> think it will fall back to the DEFAULT\_CA\_FILE in the omnibus build  
> correctly...
> 
> If you manually nuke that file does excon 0.25.0 work correctly?

Yep! That allowed a successful run with excon 0.25.0.

Should I open a bug with all of this info?

> On 6/21/13 12:50 PM, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> 
> > On Fri, 21 Jun 2013, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> > 
> > > My newly launched nodes started failing in their route53 recipe last nite with  
> > > this error:
> > > 
> > > FATAL: Excon::Errors::SocketError:  
> > > route53\_record[[chef-ci-web.dev.needtogetmyoontzon.com](http://chef-ci-web.dev.needtogetmyoontzon.com)]  
> > > (resolver::default line 128) had an error: Excon::Errors::SocketError:  
> > > Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or  
> > > `Excon.defaults[:ssl_verify_peer] = false` (less secure).
> > > 
> > > On such a system, I see:
> > > 
> > > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.25.0
> > > 
> > > On a system launched only a couple days ago, I see
> > > 
> > > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.24.0
> > > 
> > > I see 0.25.0 changed the behavior of how it finds certs:  
> > > [excon/changelog.txt at master · excon/excon · GitHub](https://github.com/geemus/excon/blob/master/changelog.txt)
> > > 
> > > I'm not sure if I should bug geemus, or the chef community. In the meantime,  
> > > I'm gonna see if I can pin my clients to 0.24.0 so we're not stuck on this.  
> > > I was able to prevent excon 0.25.0 from being installed, and instead install  
> > > excon 0.24.0 by calling this early in my run\_list:
> > 
> > ```
> > chef_gem "excon" do
> > version "0.24.0"
> > end
> > 
> > ```
> > 
> > fwiw.
> > 
> > My deets:
> > 
> > AWS Linux 2012.09, chef 10.24.0

---

<div class="post-metadata">

**Author:** ![Lamont\_Granquist\_OLD](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@Lamont\_Granquist\_OLD](https://discourse.chef.io/u/Lamont_Granquist_OLD)\
**Post date:** [June 21, 2013, 9:44pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123/5 "2013-06-21T21:44:27Z")

</div>

Yes, plz to be opening bug. =)

I'm not certain that is the right solution, we might be able to fix  
ssl\_context.cert\_store.set\_default\_paths as used by excon to DTRT which  
may be more correct, but that'll take more research...

On 6/21/13 2:41 PM, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:

> On Fri, 21 Jun 2013, Lamont Granquist wrote:
> 
> > It looks like excon is now searching for an openssl.cnf, and omnibus  
> > ships with the example openssl.cnf which openssl installs by default  
> > in the omnibus build at /opt/chef/embedded/ssl/openssl.cnf -- and  
> > when it finds that file it goes off and does something using  
> > incorrect information that isn't entirely clear to me...
> > 
> > Since the start of openssl.cnf begins with a comment about "This is  
> > mostly being used for generation of certificate requests." it isn't  
> > clear to me why a client app expects to get something useful out of  
> > that. But it also isn't clear to me why openssl isn't installing  
> > that as openssl.cnf.example or something.
> > 
> > AFAIK, we could remove that out of the omnibus build and then I  
> > think it will fall back to the DEFAULT\_CA\_FILE in the omnibus build  
> > correctly...
> > 
> > If you manually nuke that file does excon 0.25.0 work correctly?
> 
> Yep! That allowed a successful run with excon 0.25.0.
> 
> Should I open a bug with all of this info?
> 
> > On 6/21/13 12:50 PM, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> > 
> > > On Fri, 21 Jun 2013, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> > > 
> > > > My newly launched nodes started failing in their route53 recipe last nite with  
> > > > this error:
> > > > 
> > > > FATAL: Excon::Errors::SocketError:  
> > > > route53\_record[[chef-ci-web.dev.needtogetmyoontzon.com](http://chef-ci-web.dev.needtogetmyoontzon.com)]  
> > > > (resolver::default line 128) had an error: Excon::Errors::SocketError:  
> > > > Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or  
> > > > `Excon.defaults[:ssl_verify_peer] = false` (less secure).
> > > > 
> > > > On such a system, I see:
> > > > 
> > > > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.25.0
> > > > 
> > > > On a system launched only a couple days ago, I see
> > > > 
> > > > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.24.0
> > > > 
> > > > I see 0.25.0 changed the behavior of how it finds certs:  
> > > > [excon/changelog.txt at master · excon/excon · GitHub](https://github.com/geemus/excon/blob/master/changelog.txt)
> > > > 
> > > > I'm not sure if I should bug geemus, or the chef community. In the meantime,  
> > > > I'm gonna see if I can pin my clients to 0.24.0 so we're not stuck on this.  
> > > > I was able to prevent excon 0.25.0 from being installed, and instead install  
> > > > excon 0.24.0 by calling this early in my run\_list:
> > > 
> > > ```
> > > chef_gem "excon" do
> > > version "0.24.0"
> > > end
> > > 
> > > ```
> > > 
> > > fwiw.
> > > 
> > > My deets:
> > > 
> > > AWS Linux 2012.09, chef 10.24.0

---

<div class="post-metadata">

**Author:** ![Kallen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallen/32/1049_2.png) [@Kallen](https://discourse.chef.io/u/Kallen)\
**Post date:** [June 21, 2013, 9:58pm UTC](https://discourse.chef.io/t/excon-errors-socketerror-unable-to-verify-certificate/4123/6 "2013-06-21T21:58:17Z")

</div>

Done. Thanks Lamont!

[http://tickets.opscode.com/browse/CHEF-4309](http://tickets.opscode.com/browse/CHEF-4309)

On Fri, 21 Jun 2013, Lamont Granquist wrote:

> Yes, plz to be opening bug. =)
> 
> I'm not certain that is the right solution, we might be able to fix  
> ssl\_context.cert\_store.set\_default\_paths as used by excon to DTRT  
> which may be more correct, but that'll take more research...
> 
> On 6/21/13 2:41 PM, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> 
> > On Fri, 21 Jun 2013, Lamont Granquist wrote:
> > 
> > > It looks like excon is now searching for an openssl.cnf, and omnibus  
> > > ships with the example openssl.cnf which openssl installs by default  
> > > in the omnibus build at /opt/chef/embedded/ssl/openssl.cnf -- and  
> > > when it finds that file it goes off and does something using  
> > > incorrect information that isn't entirely clear to me...
> > > 
> > > Since the start of openssl.cnf begins with a comment about "This is  
> > > mostly being used for generation of certificate requests." it isn't  
> > > clear to me why a client app expects to get something useful out of  
> > > that. But it also isn't clear to me why openssl isn't installing  
> > > that as openssl.cnf.example or something.
> > > 
> > > AFAIK, we could remove that out of the omnibus build and then I  
> > > think it will fall back to the DEFAULT\_CA\_FILE in the omnibus build  
> > > correctly...
> > > 
> > > If you manually nuke that file does excon 0.25.0 work correctly?
> > 
> > Yep! That allowed a successful run with excon 0.25.0.
> > 
> > Should I open a bug with all of this info?
> > 
> > > On 6/21/13 12:50 PM, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> > > 
> > > > On Fri, 21 Jun 2013, [kallen@groknaut.net](mailto:kallen@groknaut.net) wrote:
> > > > 
> > > > > My newly launched nodes started failing in their route53 recipe last nite with  
> > > > > this error:
> > > > > 
> > > > > FATAL: Excon::Errors::SocketError:  
> > > > > route53\_record[[chef-ci-web.dev.needtogetmyoontzon.com](http://chef-ci-web.dev.needtogetmyoontzon.com)]  
> > > > > (resolver::default line 128) had an error: Excon::Errors::SocketError:  
> > > > > Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or  
> > > > > `Excon.defaults[:ssl_verify_peer] = false` (less secure).
> > > > > 
> > > > > On such a system, I see:
> > > > > 
> > > > > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.25.0
> > > > > 
> > > > > On a system launched only a couple days ago, I see
> > > > > 
> > > > > /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/excon-0.24.0
> > > > > 
> > > > > I see 0.25.0 changed the behavior of how it finds certs:  
> > > > > [excon/changelog.txt at master · excon/excon · GitHub](https://github.com/geemus/excon/blob/master/changelog.txt)
> > > > > 
> > > > > I'm not sure if I should bug geemus, or the chef community. In the meantime,  
> > > > > I'm gonna see if I can pin my clients to 0.24.0 so we're not stuck on this.  
> > > > > I was able to prevent excon 0.25.0 from being installed, and instead install  
> > > > > excon 0.24.0 by calling this early in my run\_list:
> > > > 
> > > > ```
> > > > chef_gem "excon" do
> > > > version "0.24.0"
> > > > end
> > > > 
> > > > ```
> > > > 
> > > > fwiw.
> > > > 
> > > > My deets:
> > > > 
> > > > AWS Linux 2012.09, chef 10.24.0
