Resetting opscode-reporting password

Alex Vinyar -

Once in a while upgrading opscode-reporting goes wrong. Or in the process of uninstall/reinstall somehow passwords go out of sync.

The solution is to reset the passwords to what the system thinks the passwords should be and restart supervisor service.

 

0. Run the following reconfigures to make sure nothing is pending. 

 chef-server-ctl reconfigure 
opscode-reporting-ctl

1. Open up /etc/opscode-reporting/opscode-reporting-secrets.json Grab opscode_reporting & opscode_reporting_ro passwords and pipe them to opscode-pgsql using


echo "ALTER USER opscode_reporting PASSWORD 'XXXXX' " | su -l opscode-pgsql -c 'psql'
echo "ALTER USER opscode_reporting_ro PASSWORD 'XXXXX' " | su -l opscode-pgsql -c 'psql'

You should get the result "ALTER ROLE" from each of the 'echo' commands

 

2. Next, make sure rabbitmq password is in sync:

In the same/etc/opscode-reporting/opscode-reporting-secrets.json file, in the "opscode_reporting" section, grab the "rabbitmq_password" and use it in place of XXXXX

PATH=/opt/opscode/embedded/bin:$PATH rabbitmqctl change_password runs XXXXX
 

3. Restart opscode-reporting with

 chef-server-ctl restart opscode-reporting

4. And finally, you might still have issues with the reporting page not loading.

If you look at the process list (ps faux) and see an error similar to below, send a HUP signal to svlogd to reload the configs.

 

root      1456  0.0  0.0   4092   196 ?        Ss    2015   3:12 runsvdir -P /opt/opscode/service log: vlogd: pausing: unable to rename current: /var/log/opscode/opscode-reporting: file does not exist?svlogd: pausing: unable to rename current: /var/log/opscode/opscode-reporting: file does not exist?svlogd: pausing: unable to rename current: /var/log/opscode/opscode-reporting: file does not exist?svlogd: pausing: unable to rename current: /var/log/opscode/opscode-reporting: file does not exist?

Grab the correct pid by running the status command and looking for the line containing "opscode-reporting"

chef-server-ctl status

...

run: opscode-reporting: (pid 17407) 30088s; run: log: (pid 32415) 88051s

Then, kill the PID you find

kill -HUP 32415

5. (optional) Restart supervisor processes if necessary

Stop all chef services chef-server-ctl stop
Stop manage chef-manage-ctl stop
Stop runsvdir for chef server initctl stop private-chef-runsvdir
Stop runsvdir for manage initctl stop chef-manage-runsvdir

at this point take a look at your processes and if you see anything still remaining, kill them off, and restart chef server

Start runsvdir initctl start private-chef-runsvdir
Start runsvdir for manage initctl start chef-manage-runsvdir
Start chef-server-ctl start
Start manage chef-manage-ctl start

 

Have more questions? Submit a request

Comments

Powered by Zendesk