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

**URL:** <https://discourse.chef.io/t/file-etc-opscode-private-chef-secrets-json-is-missing/10152>\
**Category:** Chef Infra (archive)\
**Created:** [January 5, 2017, 5:27pm UTC](https://discourse.chef.io/t/file-etc-opscode-private-chef-secrets-json-is-missing/10152 "2017-01-05T17:27:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghughlett](https://avatars.discourse-cdn.com/v4/letter/g/dfb087/32.png) [@ghughlett](https://discourse.chef.io/u/ghughlett)\
**Post date:** [January 5, 2017, 5:27pm UTC](https://discourse.chef.io/t/file-etc-opscode-private-chef-secrets-json-is-missing/10152/1 "2017-01-05T17:27:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ghughlett](https://avatars.discourse-cdn.com/v4/letter/g/dfb087/32.png) [@ghughlett](https://discourse.chef.io/u/ghughlett)\
**Post date:** [January 5, 2017, 6:40pm UTC](https://discourse.chef.io/t/file-etc-opscode-private-chef-secrets-json-is-missing/10152/2 "2017-01-05T18:40:51Z")

</div>

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.
