# Unable to upload cookbooks to chef server using knife

**URL:** <https://discourse.chef.io/t/unable-to-upload-cookbooks-to-chef-server-using-knife/4864>\
**Category:** Chef Infra (archive)\
**Created:** [January 9, 2014, 10:50am UTC](https://discourse.chef.io/t/unable-to-upload-cookbooks-to-chef-server-using-knife/4864 "2014-01-09T10:50:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seemakhalkar14](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Seemakhalkar14](https://discourse.chef.io/u/Seemakhalkar14)\
**Post date:** [January 9, 2014, 10:50am UTC](https://discourse.chef.io/t/unable-to-upload-cookbooks-to-chef-server-using-knife/4864/1 "2014-01-09T10:50:13Z")

</div>

Hi,

We are unable to upload a cookbook to chef-server. There is connectivity  
between the knife VM and chef server and the pem authentication works fine.  
Checked with creating a node and client, those actions get reflected in the  
knife node. with knife client list and knife node list.  
However when we try to upload a cookbook with knife , we get ehe below error

/usr/lib/ruby/1.9.1/net/http.rb:763:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) from /usr/lib/ruby/1.9.1/net/http.rb:763:in`open’  
from /usr/lib/ruby/1.9.1/net/http.rb:763:in `block in connect’

we tried setting the host name in chef server and knife both in /etc/hosts/  
set the proxy in knife.rb (incase it was a proxy issue) but we still are not  
able to upload

Any pointers are appriciated.
