Uninstall Chef Reporting causes client side error 502


#1

I was not using Chef Reporting, so I uninstalled it from the server, but now every Chef client run complains:

$ sudo chef-client
Starting Chef Client, version 12.0.3
[2017-04-04T16:16:27-04:00] ERROR: Server returned error 502 for https://my-chef-server/organizations/my-organization/reports/nodes/my-node-name/runs, retrying 1/5 in 3s
[2017-04-04T16:16:31-04:00] ERROR: Server returned error 502 for https://my-chef-server/organizations/my-organization/reports/nodes/my-node-name/runs, retrying 2/5 in 8s
[2017-04-04T16:16:39-04:00] ERROR: Server returned error 502 for https://my-chef-server/organizations/my-organization/reports/nodes/my-node-name/runs, retrying 3/5 in 11s
[2017-04-04T16:16:50-04:00] ERROR: Server returned error 502 for https://my-chef-server/organizations/my-organization/reports/nodes/my-node-name/runs, retrying 4/5 in 20s
[2017-04-04T16:17:11-04:00] ERROR: Server returned error 502 for https://my-chef-server/organizations/my-organization/reports/nodes/my-node-name/runs, retrying 5/5 in 36s

This happens on existing nodes, and also on new nodes that I bootstrap into the cluster. I backed up and restored the Chef Server installation onto a complete new machine, but the problem persists.

Ultimately, Chef Client does run, but the 502 error is a nuisance.


#2

I was running into this issue as well after upgrading Chef Server, I hadn’t uninstalled Chef Reporting though.

Running the following seems to have fixed it for me:

opscode-reporting-ctl reconfigure

#3

Hopefully someone more knowledgeable than I can post a better way, but if opscode-reporting-ctl reconfigure isn’t an option because you uninstalled reporting, you can try going into /var/opt/opscode/nginx/etc/addon.d and removing 20-reporting-*.conf (or moving aside if you’re worried about deleting files), then running chef-server-ctl restart nginx. That will remove the configuration that points to reporting and hopefully stop the 502 errors.