i’m on track of learning the chef from learn.chef.io I was setting up by chef server which run out in the nginx service start issue.I was digging for almost 6 hours to resolve the issue.But I was run out to several outcome.
I was following the blog to install chef server in my workstation.
So while configuring the user account run out that time that some error message thrown
ERROR: Connection refused connecting to https://127.0.0.1/users, retry 1/5
Followed few git bug list
issue might due to nginx service might not started,following blogger state that this might to improper resolve issue.
Chefsvr is my server hostname and added host entry in the server,I’m in Ubuntu /etc/host
Then I ran the following command
chef-serverl-ctl tail nginx
Found the below error message
2017-08-27_10:08:25.09220 nginx: [emerg] BIO_new_file(“/var/opt/opscode/nginx/ca/chefsvr.crt”) failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(‘/var/opt/opscode/nginx/ca/chefsvr.
crt’,’r’) error:2006D080:BIO routines:BIO_new_file:no such file)
error message clearly states that the error due to unavailability of the crt file.Then I create a 2048 bit crt file in the following location and start the service,it works charm.
147 cd /var/opt/opscode/nginx/ca/
149 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /var/opt/opscode/nginx/ca/chefsvr.key -out /var/opt/opscode/nginx/ca/chefsvr.crt
151 chef-server-ctl tail nginx
152 chef-server-ctl stop
153 chef-server-ctl start
154 chef-server-ctl install chef-manage
155 chef-server-ctl user-create admin admin admin email@example.com password -f ~/.chef/admin.pem
I was able to create the user account.