Book Image

Learning Chef

By : Rishabh Sharma, Mitesh Soni
Book Image

Learning Chef

By: Rishabh Sharma, Mitesh Soni

Overview of this book

<p>Chef automation helps to transform infrastructure into simple code. This means that building, rebuilding, configuration, and scaling to meet your customer's needs is possible in just a few minutes in a real-time environment.</p> <p>This book begins with the conceptual architecture of Chef, walking you through detailed descriptions of every Chef element. You will learn the procedure to set up your workstation and how to create a Cookbook in a hosted Chef environment.</p> <p>Private Chef Server setup is covered in depth, with information on the necessity of on-premise Private Chef deployment, benefits, and installation and configuration procedures for the different types of Private Chef servers including standalone, tiered, and high-availability.</p> <p>This book sheds light on industry best practices with practical Chef scenarios and examples.</p>
Table of Contents (17 chapters)
Learning Chef
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Troubleshooting


Here, we will see all the possible error types which user may encounter during workstation setup and cookbook creation and their troubleshooting steps accordingly.

Error code – type 1

If you get an error of this type:

INFO: Client key /etc/chef/client.pem is not present - registering
INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate as ORGANIZATION-validator. Ensure that your node_name and client key are correct.
FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
FATAL: Net::HTTPServerException: 401 "Unauthorized"

Meaning

This means that the organization-validator.pem file is not getting authenticated. It is a Chef 401 "Unauthorized" error.

Troubleshooting steps

In order to troubleshoot this, the validation key should be regenerated.

In the preceding code, check whether the file is referenced in validation_key (usually, ORGANIZATION-validator.pem) exists in one of these locations:

    ~/.chef
    ~/projects/current_project/.chef
    /etc/chef

Check...