Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandoaleman/3d520408fe09a75fda5588aa5edeed5d to your computer and use it in GitHub Desktop.
Save fernandoaleman/3d520408fe09a75fda5588aa5edeed5d to your computer and use it in GitHub Desktop.
Solving Chef ERROR: Running exception handlers - 403 Forbidden

Error

Running handlers:
[2018-10-01T11:07:45-05:00] ERROR: Running exception handlers
Running handlers complete
[2018-10-01T11:07:45-05:00] ERROR: Exception handlers complete
Chef Client failed. 33 resources updated in 01 minutes 06 seconds
[2018-10-01T11:07:45-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2018-10-01T11:07:45-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-10-01T11:07:45-05:00] ERROR: 403 "Forbidden"
[2018-10-01T11:07:45-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Solution

knife acl bulk add group clients nodes '.*' update,read
@vivekraj59
Copy link

if you are getting above error that means your recipe syntax is wrong. you can check the syntax by below command.

chef exec ruby -c path/recipe_name

@timcondit
Copy link

Thank you for this ACL fix!
Also, my ruby syntax is OK.

@Mygit143
Copy link

ubuntu@ip-172-31-43-25:~$ sudo chef-client --local-mode hello-recipe.rb
[2020-05-31T11:58:40+00:00] WARN: No config file found or specified on command line. Using command line options instead.
[2020-05-31T11:58:40+00:00] WARN: No cookbooks directory found at or above current directory. Assuming /home/ubuntu.
Starting Chef Infra Client, version 15.7.32
resolving cookbooks for run list: []
Synchronizing Cookbooks:
Installing Cookbook Gems:
Compiling Cookbooks...

Running handlers:
[2020-05-31T11:58:42+00:00] ERROR: Running exception handlers
Running handlers complete
[2020-05-31T11:58:42+00:00] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 01 seconds
[2020-05-31T11:58:42+00:00] FATAL: Stacktrace dumped to /home/ubuntu/.chef/local-mode-cache/cache/chef-stacktrace.out
[2020-05-31T11:58:42+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2020-05-31T11:58:42+00:00] FATAL: SyntaxError: /home/ubuntu/hello-recipe.rb:6: syntax error, unexpected end-of-input, expecting end

help me guys i need this

@sivaoguri
Copy link

Running handlers:
[2022-04-12T09:56:55+00:00] ERROR: Running exception handlers
Running handlers complete
[2022-04-12T09:56:55+00:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 02 seconds
[2022-04-12T09:56:55+00:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
[2022-04-12T09:56:55+00:00] FATAL: ---------------------------------------------------------------------------------------
[2022-04-12T09:56:55+00:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2022-04-12T09:56:55+00:00] FATAL: ---------------------------------------------------------------------------------------
[2022-04-12T09:56:55+00:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist: file[ /myfile] (test-cookbook::test-recipe line 11) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory does not exist.
[root@ip-172-31-28-150 cookbooks]#

@abhisoumya1995
Copy link

[2023-12-25T01:20:51+00:00] WARN: No config file found or specified on command line. Using command line options instead.
Chef Infra Client, version 18.3.0
Patents: https://www.chef.io/patents
Infra Phase starting
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
opening connection to 169.254.169.254:80...
opened
Resolving cookbooks for run list: ["test-cookbook::recipe2"]
Synchronizing cookbooks:

  • test-cookbook (0.1.0)
    Installing cookbook gem dependencies:
    Compiling cookbooks...
    Loading Chef InSpec profile files:
    Loading Chef InSpec input files:
    Loading Chef InSpec waiver files:
    Converging 0 resources

Running handlers:
Running handlers complete
Infra Phase complete, 0/0 resources updated in 02 seconds

Please help me guys. I am unable to create my file. What should I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment