{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef-server/issues/375","labels_url":"https://api.github.com/repos/chef/chef-server/issues/375/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef-server/issues/375/comments","events_url":"https://api.github.com/repos/chef/chef-server/issues/375/events","html_url":"https://github.com/chef/chef-server/issues/375","id":92506626,"number":375,"title":"CS 12.1.0 nginx can't reach OC-ID if localhost resolves to IPv6 address","user":{"login":"jeremiahsnapp","id":430911,"avatar_url":"https://avatars.githubusercontent.com/u/430911?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremiahsnapp","html_url":"https://github.com/jeremiahsnapp","followers_url":"https://api.github.com/users/jeremiahsnapp/followers","following_url":"https://api.github.com/users/jeremiahsnapp/following{/other_user}","gists_url":"https://api.github.com/users/jeremiahsnapp/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremiahsnapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremiahsnapp/subscriptions","organizations_url":"https://api.github.com/users/jeremiahsnapp/orgs","repos_url":"https://api.github.com/users/jeremiahsnapp/repos","events_url":"https://api.github.com/users/jeremiahsnapp/events{/privacy}","received_events_url":"https://api.github.com/users/jeremiahsnapp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/chef-server/labels/oc-id","name":"oc-id","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-01T23:28:43Z","updated_at":"2015-07-15T20:17:21Z","closed_at":null,"body":"[Chef Server 12.1.0 OC-ID uses rails 4.2.0](https://github.com/chef/chef-server/blob/12.1.0/src/oc-id/Gemfile.lock#L267) which [now listens on localhost instead of 0.0.0.0 by default](http://guides.rubyonrails.org/4_2_release_notes.html#default-host-for-rails-server).\r\n\r\nIf `/etc/hosts` has localhost resolving to both IPv4 and IPv6 IP addresses then rails will bind to the IPv6 address. This breaks access to OC-ID because `oc_id['vip']` [currently defaults](https://github.com/chef/chef-server/blob/12.1.0/omnibus/files/private-chef-cookbooks/private-chef/attributes/default.rb#L518) to `127.0.0.1`. This breaks OAuth login for private Supermarket and Analytics servers.\r\n\r\nProposed fix is to change the default to be `oc_id['vip'] = 'localhost'`. This fix works in my test server."},"comment":{"url":"https://api.github.com/repos/chef/chef-server/issues/comments/121733355","html_url":"https://github.com/chef/chef-server/issues/375#issuecomment-121733355","issue_url":"https://api.github.com/repos/chef/chef-server/issues/375","id":121733355,"user":{"login":"pmoosh","id":340465,"avatar_url":"https://avatars.githubusercontent.com/u/340465?v=3","gravatar_id":"","url":"https://api.github.com/users/pmoosh","html_url":"https://github.com/pmoosh","followers_url":"https://api.github.com/users/pmoosh/followers","following_url":"https://api.github.com/users/pmoosh/following{/other_user}","gists_url":"https://api.github.com/users/pmoosh/gists{/gist_id}","starred_url":"https://api.github.com/users/pmoosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmoosh/subscriptions","organizations_url":"https://api.github.com/users/pmoosh/orgs","repos_url":"https://api.github.com/users/pmoosh/repos","events_url":"https://api.github.com/users/pmoosh/events{/privacy}","received_events_url":"https://api.github.com/users/pmoosh/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T20:17:21Z","updated_at":"2015-07-15T20:17:21Z","body":"Yep - happens to me as well. Currently I just remove the localhost entry for IPV6 address. I would assume it should listen on IPV4 as well as IPV6"}}