gbaii
gbaii

Reputation: 473

Chef bootstrapping new node Failed to authenticate to the chef server (http 401)

I have a Chef server on a CentOS 6. I have about 92 nodes bootstrapped already. The problem started today when I tried to bootstrap a new node (CentOS 6). The command I run is:

knife bootstrap node10 -N node10 -x user -P 'password' --sudo

The output is as follow:

node10 warning: /tmp/install.sh.1137/chef-12.5.1-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 52ff435y: NOKEY

node10 Preparing...  ########################################### [100%]

node10    1:chef     ########################################### [100%]

node10 Thank you for installing Chef!

node10 Starting first Chef Client run...

node10 Starting Chef Client, version 12.5.1

node10 Creating a new client identity for node10 using the validator key.


node10 =========================================================

node10 Chef encountered an error attempting to create the client "node10"

node10 =========================================================

node10 Authentication Error:

node10 Failed to authenticate to the chef server (http 401).


node10 Server Response:


node10 Invalid signature for user or client 'org-validator'


node10 Relevant Config Settings:


node10 chef_server_url         "https://chef01.corp/organizations/devdept"

node10 validation_client_name  "org-validator"

node10 validation_key          "/etc/chef/validation.pem"


node10 If these settings are correct, your validation_key may be invalid.

node10 Running handlers:

node10 [2015-12-15T18:11:13+02:00] ERROR: Running exception handlers

node10 Running handlers complete

node10 [2015-12-15T18:11:13+02:00] ERROR: Exception handlers complete

node10 Chef Client failed. 0 resources updated in 13 minutes 48 seconds

node10 [2015-12-15T18:11:13+02:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

node10 [2015-12-15T18:11:13+02:00] ERROR: 401 "Unauthorized"

node10 [2015-12-15T18:11:13+02:00] FATAL: Chef::Exceptions::ChildConvergeError: 
Chef run process exited unsuccessfully (exit code 1)

What is there to be done? As I was saying, the machine is brand new.

Thank you, Gabriel

Upvotes: 1

Views: 4527

Answers (1)

coderanger
coderanger

Reputation: 54181

Someone likely regenerated the validator key on the Chef server without your knowledge. You would need a copy of the new key. Alternatively you can just switch to validator-less bootstraps by removing it from your workstation and config files.

Upvotes: 2

Related Questions