If you find a 502 Bad Gateway error in the nginx access log on your Analytics system with the following path and you cannot login to the Analytics system, you need to take a look at the /var/log/oc_id/current logfile on the associated Chef Server.
On the Chef Server, you will likely see the oc_id service cycling, trying and failing to come up while mentioning the following file
Go ahead and delete the pid file above, and the oc_id service will come up. Once you have done this, the Analytics system should once again allow logins. Analytics server logins are always referred to the Chef Server using oauth, which will make the determination about whether or not the username is allowed to login to the Analytics system. This means that the same user must be allowed to login to the Chef Server. Both username and password will be the same as are used on the Chef Server.
The reason this issue happens is that the chef server hardware/OS itself is shut down uncleanly, like from a power fault or other catastrophic issue.