Skip to content

Instantly share code, notes, and snippets.

@nellshamrell
Last active November 16, 2016 23:41
Show Gist options
  • Save nellshamrell/c4236446b41943a5ea41 to your computer and use it in GitHub Desktop.
Save nellshamrell/c4236446b41943a5ea41 to your computer and use it in GitHub Desktop.
Let's say you have a working, running Chef Server. And let's also say you have a working, running, brand new Supermarket you just spun up. Everything appears to be working fine.
BUT - when you click the "Sign In" link in the upper right hand corner of your Supermarket view in your browser, you suddenly see an error that looks like this:
502 Bad Gateway
openresty/1.17.10.1
Oh noes!!!!
This is due to a known issue with the latest version of Chef Server (https://github.com/chef/chef-server/issues/375). A patch has been merged into the main code base for Chef Server, but it has not yet been released. Until then, here is a workaround.
Work Around:
On your Chef Server (NOT your Supermarket server!), open up the file at /etc/opscode/chef-server.rb and add this line to the top of the file:
oc_id['vip'] = 'localhost'
Save and close the file, then run:
$ chef-server-ctl reconfigure
Now try signing into Supermarket and it should connect to your Chef Server just fine!
@snowtigger
Copy link

I'm using chef-server v 12.0.7, supermarket (supermarket-2.8.30-1.el6.x86_64.rpm) on rhel 6. After doing what is described above, I'm still getting the following error:

502 Bad Gateway
ngx_openresty/1.4.3.6

Any ideas how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment