summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/formatters/error_inspectors/registration_error_inspector.rb')
-rw-r--r--lib/chef/formatters/error_inspectors/registration_error_inspector.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
index 4ca08ca120..002870abeb 100644
--- a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
@@ -29,24 +29,24 @@ class Chef
error_description.section("Network Error:", <<~E)
There was a network error connecting to the Chef Server:
#{exception.message}
-E
+ E
error_description.section("Relevant Config Settings:", <<~E)
chef_server_url "#{server_url}"
If your chef_server_url is correct, your network could be down.
-E
+ E
when Chef::Exceptions::PrivateKeyMissing
error_description.section("Private Key Not Found:", <<~E)
Your private key could not be loaded. If the key file exists, ensure that it is
readable by chef-client.
-E
+ E
error_description.section("Relevant Config Settings:", <<~E)
validation_key "#{api_key}"
-E
+ E
when Chef::Exceptions::InvalidRedirect
error_description.section("Invalid Redirect:", <<~E)
Change your server location in client.rb to the server's FQDN to avoid unwanted redirections.
-E
+ E
when EOFError
describe_eof_error(error_description)
else
@@ -63,11 +63,11 @@ E
Failed to authenticate to the chef server (http 401).
The request failed because your clock has drifted by more than 15 minutes.
Syncing your clock to an NTP Time source should resolve the issue.
-E
+ E
else
error_description.section("Authentication Error:", <<~E)
Failed to authenticate to the chef server (http 401).
-E
+ E
error_description.section("Server Response:", format_rest_error)
error_description.section("Relevant Config Settings:", <<~E)
@@ -76,34 +76,34 @@ E
validation_key "#{api_key}"
If these settings are correct, your validation_key may be invalid.
-E
+ E
end
when Net::HTTPForbidden
error_description.section("Authorization Error:", <<~E)
Your validation client is not authorized to create the client for this node (HTTP 403).
-E
+ E
error_description.section("Possible Causes:", <<~E)
* There may already be a client named "#{config[:node_name]}"
* Your validation client (#{username}) may have misconfigured authorization permissions.
-E
+ E
when Net::HTTPBadRequest
error_description.section("Invalid Request Data:", <<~E)
The data in your request was invalid (HTTP 400).
-E
+ E
error_description.section("Server Response:", format_rest_error)
when Net::HTTPNotFound
error_description.section("Resource Not Found:", <<~E)
The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
-E
+ E
error_description.section("Relevant Config Settings:", <<~E)
chef_server_url "#{server_url}"
-E
+ E
when Net::HTTPNotAcceptable
describe_406_error(error_description, response)
when Net::HTTPInternalServerError
error_description.section("Unknown Server Error:", <<~E)
The server had a fatal error attempting to load the node data.
-E
+ E
error_description.section("Server Response:", format_rest_error)
when Net::HTTPBadGateway, Net::HTTPServiceUnavailable
error_description.section("Server Unavailable", "The Chef Server is temporarily unavailable")