Unable to install chef server on Redhat

I am getting the following error while trying to create user
ERROR: Server returned error 502 for https://127.0.0.1/users/
Could anyone help me in resolving this.

What is the command the you are running to get this error? Is it the chef-server-ctl reconfigure?
Can you check you /etc/hosts file and ensure the there is a entry for just localhost ?

I ran the following command

chef-server-ctl user-create USER_NAME FIRST_NAME LAST_NAME EMAIL ‘PASSWORD’ --filename FILE_NAME

and I have an entry for localhost

What version of Redhat and what version of Chef Server are you using? I am going to see if I can replicate your issue. There are some posts online that suggest that a 502 might be caused by a gateway issue, though I am not sure how that command would cause a gateway error.

I am trying to install the latest version of Chef-server on RHEL-7.1. I don’t how but my issue got resolved when I issued the command. Chef-server-ctl cleanse and reinstalling the server from scratch.

Awesome! I’m glad you were able to fix it. I say something on Stack Overflow that was a similar issue just out of curiosity was this a server that you had previously installed Chef server on prior to seeing the 502 error?

But I am facing an issue with bootstraping clients. It is not generating any validation key in the starter kit.But when I am running chef-client on node it is searching for validation key. Could you please help me on this.

Interesting. So just so I am sure I understand when you download the starter kit you are not seeing the organization-validator.pem file in the .chef file of the chef-repo? When you run knife bootstrap is there an error? I am assuming that bootstrap isn’t giving an error, but when you run the client it error’s out saying that it can’t find the validator.pem in the chef folder on the node. What is the OS of the node you are trying to bootstrap? Is the chef-client already installed on the node or are you letting the bootstrap process install it? I also do not see the organization-validator.pem in my .chef folder. I think that this may be a communication issue between the chef server and the node that is failing to create the validator.pem file on the node. Is the chef-client.rb on the node? Hopefully this helps lead you in the right direction.

No I haven't received any error with bootstrap and the client got registered with the chef-server. I am trying to run chef-client on RHEL-7.2. Bootstrap process have already installed the chef-client on it and created a client.pem. So I though that chef-client should use client.pem to run the client on it. But it is not working