File /etc/opscode/private-chef-secrets.json is missing


running chef-server-ctl reconfigure command on chef server installation 12.17.17
Get error
This was after I got errors telling me the pivotal.rb and pivotal.pem were not in the /etc/opscode directory. I found the files in the /opt/opscode installation and copied them there. Unfortunately there is no private-chef-secrets.json.
BOOT006: The pivotal user key is present (/etc/opscode/pivotal.pem)
but the file /etc/opscode/private-chef-secrets.json is missing.

     Ensure that pivotal.pem is copied over into /etc/opscode from the
     first Chef Server node that you brought online, then run
     'chef-server-ctl reconfigure' again.

In other community posts the problem was the opposite, that the private-chef-secrets.json is present but the pem or rb files are missing.

Can someone kindly help me locate or recreate this file?


I replicated the issue on a brand new server (RHEL7, same as first server) and did another Chef Server install. After some dinking around I stumbled on the fix, which was to remove all of the files in the /etc/opscode directory and rerun the chef-server-ctl reconfigure command a second time. I did the same thing to the first server and that too corrected the problem there. Apparently the initial installation of chef server seeded the /etc/opscode directory with something invalid.