Chef server on another port

I installed the chef server on the server that is behind the firewall, i.e. I needed to configure some natting for this server so that it was available, and as a result, the server is accessible on port 449 from the outside (instead of the standard port 443 https). Now I installed the chef on my workstation and installed the knife. I set chef_server_url as https://blahblah.com-00-0049 (this is a dummy domain). Now I can connect with the knife to the server, because if I run something like a "knife client list", it gives a list. However, if I want to download the cookbook, it doesnโ€™t seem like it is trying to connect to chef_server_url on the regular 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 why this is done, and if / how can I tell the chef to use port 449?

Thank you very much in advance!

+6
source share
2 answers

You need 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 

See documents .

+5
source

try the command below:

 knife cookbook upload hostname --server-url https://blahblah.com:449 

If this works, you need to update your .rb knife below:

 chef_server_url "https://blahblah.com:449" 
0
source

Source: https://habr.com/ru/post/950841/


All Articles