0

I have

chef_server_url 'https://192.168.1.1/organizations/orgname'

in my

.chef/knife.rb

along with

knife[:bootstrap_proxy] = "http://172.16.1.254:3128/"
knife[:http_proxy] = "http://172.16.1.254:3128/"

knife status shows me

knife status
ERROR: Errno::ENETUNREACH: Failed to open TCP connection to 192.168.1.1:443 (Network is unreachable - connect(2) for "192.168.1.1" port 443)

So, proxy settings is NOT in action.

How to resolve it?

sock 5 proxy for me is preferred.

0

Please check https://docs.chef.io/proxies/ and https_proxy settings

7
  • wokring. I want to emphasize that is is Linux env, not the knife config variables now it reports knife status ERROR: EOFError: end of file reached dont know why but thanks anyway! – iNio Mar 27 '20 at 11:17
  • wokring partly. knife status --verbose INFO: Using configuration from /home/user/.chef/knife.rb INFO: Sending query: : ERROR: EOFError: end of file reached I use sock5 type of proxy. – iNio Mar 27 '20 at 11:26
  • with http proxy INFO: Sending query: : ERROR: The data in your request was invalid /opt/chefdk/embedded/lib/ruby/2.3.0/net/http/response.rb:331:in stream_check': undefined method closed?' for nil:NilClass (NoMethodError) – iNio Mar 27 '20 at 11:39
  • Welcome to Super User! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – MMM Mar 27 '20 at 12:13
  • I suggest to add https_proxy=http://... knife ... (in front of knife command). since knife prefer all_proxy before http_proxy and https_proxy, also it don't support sock5 type of proxy - this is underwork as a whole chef is (including knife etc). :( avoid to use chef as a whole. – iNio Mar 27 '20 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.