# Intermittent Errno::ETIMEDOUT: error connecting to chef server

**URL:** <https://discourse.chef.io/t/intermittent-errno-etimedout-error-connecting-to-chef-server/3438>\
**Category:** Chef Infra (archive)\
**Created:** [December 4, 2012, 7:26pm UTC](https://discourse.chef.io/t/intermittent-errno-etimedout-error-connecting-to-chef-server/3438 "2012-12-04T19:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xyuan](https://avatars.discourse-cdn.com/v4/letter/x/7ba0ec/32.png) [@Xyuan](https://discourse.chef.io/u/Xyuan)\
**Post date:** [December 4, 2012, 7:26pm UTC](https://discourse.chef.io/t/intermittent-errno-etimedout-error-connecting-to-chef-server/3438/1 "2012-12-04T19:26:47Z")

</div>

Hi,

I have seen this problem intermittently when creating AWS instances. This  
causes the configuration automation very unreliable. Could somebody shed some  
clue about this?

thx,

Xianfeng

[root@ip-10-159-66-147 cache]# more chef-stacktrace.out  
Generated at Tue Dec 04 08:19:32 +0000 2012  
Errno::ETIMEDOUT: remote\_file[omakase-release.rpm] (mspot\_omakase::default line  
38) had an error: Errno::ETIMEDOUT: Error c  
onnecting to  
[http://omakase.mspot.com/yum/5/x86\_64/omakase-release-5-2.noarch.rpm](http://omakase.mspot.com/yum/5/x86_64/omakase-release-5-2.noarch.rpm) -  
Connection timed out - connect(2)  
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize' /usr/lib/ruby/1.8/net/http.rb:560:in`open’  
/usr/lib/ruby/1.8/net/http.rb:560:in `connect' /usr/lib/ruby/1.8/timeout.rb:53:in`timeout’  
/usr/lib/ruby/1.8/timeout.rb:101:in `timeout' /usr/lib/ruby/1.8/net/http.rb:560:in`connect’  
/usr/lib/ruby/1.8/net/http.rb:553:in `do_start' /usr/lib/ruby/1.8/net/http.rb:542:in`start’  
/usr/lib/ruby/1.8/net/http.rb:1035:in `request' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/rest/rest_request.rb:84:in`call’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/rest/rest\_request.rb:99:in  
`hide_net_http_bug' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/rest/rest_request.rb:83:in`call’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/rest.rb:261:in  
`streaming_request' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/rest.rb:296:in`retriable\_rest\_request’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/rest.rb:259:in  
`streaming_request' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/rest.rb:139:in`fetch’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/provider/remote\_file.rb:42:in  
`action_create' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in`send’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/resource.rb:440:in  
`run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:45:in`run\_action’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/runner.rb:81:in  
`converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in`each’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/runner.rb:81:in  
`converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:94:in`execute\_each\_resource’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/resource\_collection/stepable\_iterator.rb:116:in  
`call' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in`call\_iterator\_bloc  
k’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/resource\_collection/stepable\_iterator.rb:85:in  
`step' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in`iterate’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/resource\_collection/stepable\_iterator.rb:55:in  
`each_with_index' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:92:in`execute\_each\_resource’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/runner.rb:76:in  
`converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:312:in`converge’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/client.rb:160:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/client.rb:239:in`run\_application’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/application/client.rb:229:in  
`loop' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/client.rb:229:in`run\_application’  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/…/lib/chef/application.rb:67:in  
`run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/chef-client:26 /usr/bin/chef-client:19:in`load’  
/usr/bin/chef-client:19  
[root@ip-10-159-66-147 cache]#

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [December 4, 2012, 7:32pm UTC](https://discourse.chef.io/t/intermittent-errno-etimedout-error-connecting-to-chef-server/3438/2 "2012-12-04T19:32:21Z")

</div>

On Tuesday, December 4, 2012 at 11:26 AM, [xyuan@mspot.com](mailto:xyuan@mspot.com) wrote:

> Hi,
> 
> I have seen this problem intermittently when creating AWS instances. This  
> causes the configuration automation very unreliable. Could somebody shed some  
> clue about this?
> 
> thx,
> 
> Xianfeng
> 
> [root@ip-10-159-66-147 cache]# more chef-stacktrace.out  
> Generated at Tue Dec 04 08:19:32 +0000 2012  
> Errno::ETIMEDOUT: remote\_file[omakase-release.rpm] (mspot\_omakase::default line  
> 38) had an error: Errno::ETIMEDOUT: Error c  
> onnecting to  
> [http://omakase.mspot.com/yum/5/x86\_64/omakase-release-5-2.noarch.rpm](http://omakase.mspot.com/yum/5/x86_64/omakase-release-5-2.noarch.rpm) -

> /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/provider/remote\_file.rb:42:in  
> `action\_create'

You have a remote\_file resource that is fetching an RPM from an unreliable server. If you control that server, you should investigate it and fix it. If you do not, you could store the RPM elsewhere, either in the cookbook (though if you store your cookbooks in git, this will be a huge PITA as git accumulates different versions of the RPM over time), or S3 (makes sense because you're already using AWS anyway) or some other file storage service.

--  
Daniel DeLeo
