I am running knife client list
and getting the following error:
ERROR: Failed to authenticate to https://chef-server.dev.reach.IE.LOCAL/organizations/accenture as chef-user with key /home/svc.jenkins/helix-chef/iac_chef_standalone_wso2/.chef/chef-user.pem
Response: Failed to authenticate as chef-user. Synchronize the clock on your host.
The weird thing is that this just worked a second ago with the output message of:
$ knife client list
accenture-validator
I just ran ``knife client list``` again and received the error though (nothing has changed that should have caused this)
Knife.rb:
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "chef-user"
client_key "#{current_dir}/chef-user.pem"
validation_client_name "accenture-validator"
validation_key "#{current_dir}/accenture-validator.pem"
chef_server_url "https://chef-server.dev.reach.IE.LOCAL/organizations/accenture"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
Knife ssl check:
$ knife ssl check
Connecting to host chef-server.dev.reach.IE.LOCAL:443
Knife version:
$ knife --version
Chef: 14.1.12
(running on RedHat 7)
Does anyone know why I am getting the error and how I could resolve it?
As the error says "Synchronize the clock on your host."
Either your system clock or the clock on the Chef Server is incorrect (or in the wrong time zone relative to what it is set to). To limit replay attacks, we put a signed timestamp in all requests and it has to be within a fairly narrow window (minutes, but not seconds). That error means the server thinks your timestamp is too far out, so one or both of you is wrong about the current time.