Uninstallation and Reinstallation of CHEF


#1

I have uninstalled chef as below:

  1. chef-server-ctl cleanse
  2. chef-manage-ctl cleanse
  3. chef-server-ctl uninstall

yum remove <chef*>

Note : also removed /opt/opscode , /opt/chef and /etc/opscode, /etc/chef

and then installed the RPM and facing issue while running chef_server_ctl reconfigure

Error executing action run on resource ‘ruby_block[bootstrap-chef-server-data]’
================================================================================

RestClient::InternalServerError
-------------------------------
500 Internal Server Error

Cookbook Trace:
---------------
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:187:in `bifrost_request'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:154:in `create_object_in_authz'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:146:in `create_actor_in_authz'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:36:in `bootstrap'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:46:in `block (2 levels) in from_file'

Resource Declaration:
---------------------

================================================================================
Error executing action restart on resource ‘runit_service[nginx]’
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
STDOUT: fail: /opt/opscode/service/nginx: unable to change to service directory: file does not exist
STDERR:
---- End output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
Ran /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx returned 1

Cookbook Trace:

Running handlers:
[2016-06-23T10:44:45+05:30] ERROR: Running exception handlers
Running handlers complete
[2016-06-23T10:44:45+05:30] ERROR: Exception handlers complete
Chef Client failed. 152 resources updated in 03 minutes 39 seconds
[2016-06-23T10:44:45+05:30] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2016-06-23T10:44:45+05:30] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-06-23T10:44:45+05:30] FATAL: Chef::Exceptions::MultipleFailures: Multiple failures occurred:

  • RestClient::InternalServerError occurred in chef run: 500 Internal Server Error
  • Mixlib::ShellOut::ShellCommandFailed occurred in delayed notification: runit_service[nginx] (private-chef::nginx line 37) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
    ---- Begin output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
    STDOUT: fail: /opt/opscode/service/nginx: unable to change to service directory: file does not exist
    STDERR:
    ---- End output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
    Ran /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx returned 1