Reputation: 71
I installed a chef server 11 on a Server that is behind a firewall, ie I had to set up some natting for this server to be available and as a result the server is reachable on port 449 from the outside (instead of default 443 https port). Now I installed chef on my workstation, and set up knife. I set my chef_server_url as https://blahblah.com:449 (thats a bogus domain) . Now I can connect with knife to the server, since if I run something like 'knife client list', it does give the list. However, if I want to upload a cookbook, it does not do it, an it looks as if it tries to connect to the chef_server_url on the normal port 443:
h046n100:chef-repo chris$ knife cookbook upload hostname
Uploading hostname [0.1.0]
ERROR: Network Error: Error connecting to https://blahblah.com/sandboxes/00000000000020ec9bdebdbdaff8b9ed - Operation timed out - connect(2)
Check your knife configuration and network settings
Any ideas anyone why it is doing this, and if/how it is possible to tell chef to use port 449?
Many thanks in advance!
Upvotes: 7
Views: 10423
Reputation: 81
You have to create or edit /etc/chef-server/chef-server.rb
and add the line below:
nginx['ssl_port'] = 449
Then run:
sudo chef-server-ctl reconfigure
sudo chef-server-ctl restart
Please see the docs.
Upvotes: 7
Reputation: 23502
could you try running below command:
knife cookbook upload hostname --server-url https://blahblah.com:449
If this works, then you need to update your knife.rb with below line:
chef_server_url "https://blahblah.com:449"
Upvotes: 0