Chef crt error while starting the nginx service

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.

https://hostpresto.com/community/tutorials/install-and-configure-chef-server-on-ubuntu-14-04/

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

192.168.1.7 chefsvr
127.0.0.1 localhost

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/
148 ls
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
150 ls
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 admin@rans.com password -f ~/.chef/admin.pem

I was able to create the user account.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s