ノード、サーバー、ワークステーションの3つのコンポーネントがあります。私はこれらを設定していませんでした。私はワークステーションからナイフステータスを実行することができ、現在の結果を返します(これは、ワークステーションからサーバーへの接続を確認するものです)。私は正常にシェフクライアントをノード自体から実行することができます(これは、ノードからサーバーへの接続が+確実に既にブートストラップされていると確信しています)。ノードはシェフサーバーに接続し、ワークステーションはシェフサーバーに接続しますが、同じノードをブートストラップすると失敗します
しかし、再度ブートストラップしようとすると失敗します。私が奇妙に感じることの1つは、ワークステーション上の/etc/chef/client.rbファイルが、node_name行をブートストラップしようとしているノードの名前に置き換えられたことに気づいたことです。多分それは正常ですか?
私が選べないことは、このエラーが/ someone/chefサーバーに接続できないように見えることです。しかし、上記のように、ワークステーションとノードの両方がシェフサーバーに認証して接続できることを確認しました。
私はドキュメントを見てきましたが、大きな問題はあいまいです。 "いくつかのものは/etc/chef/client.rbにあります。" - okですが、ノード、サーバー、またはワークステーション上にありますか?彼らはすべてこのファイルを持っています!
私はワークステーションの〜/ .chef/knife.rbに "client_key"行で示されている私のキーかもしれないと思いますが、私はそれを変更したくありません。サーバ。しかし、どこかに認証の故障があるように思えます - 私はどこでもブートストラップの間にそれを見つけることができません。
[[email protected] chef]# cat client.rb
log_location STDOUT
chef_server_url "https://chefserver/organizations/domain"
validation_client_name "domain-validator"
node_name "workstation"
ssl_verify_mode :verify_none
trusted_certs_dir "/etc/chef/trusted_certs"
[[email protected] chef]# knife bootstrap node.domain.goes.here -N node -x user -i /home/user/.ssh/id_rsa --sudo --use-sudo-password --node-ssl-verify-mode none -r recipe[chef-client]
Doing old-style registration with the validation key at ~/.keys/domain-validator.pem...
Delete your validation key in order to use your user credentials instead
Connecting to node.domain.goes.here
node.domain.goes.here -----> Existing Chef installation detected
node.domain.goes.here Starting the first Chef Client run...
node.domain.goes.here Starting Chef Client, version 12.10.24
node.domain.goes.here
node.domain.goes.here ================================================================================
node.domain.goes.here Chef encountered an error attempting to load the node data for "node"
node.domain.goes.here ================================================================================
node.domain.goes.here
node.domain.goes.here Authentication Error:
node.domain.goes.here ---------------------
node.domain.goes.here Failed to authenticate to the chef server (http 401).
node.domain.goes.here
node.domain.goes.here Server Response:
node.domain.goes.here ----------------
node.domain.goes.here Invalid signature for user or client 'node'
node.domain.goes.here
node.domain.goes.here Relevant Config Settings:
node.domain.goes.here -------------------------
node.domain.goes.here chef_server_url "https://chefserver/organizations/domain"
node.domain.goes.here node_name "node"
node.domain.goes.here client_key "/etc/chef/client.pem"
node.domain.goes.here
node.domain.goes.here If these settings are correct, your client_key may be invalid, or
node.domain.goes.here you may have a chef user with the same client name as this node.
node.domain.goes.here
node.domain.goes.here Platform:
node.domain.goes.here ---------
node.domain.goes.here x86_64-linux
node.domain.goes.here
node.domain.goes.here
node.domain.goes.here Running handlers:
node.domain.goes.here [2016-12-13T13:51:26-05:00] ERROR: Running exception handlers
node.domain.goes.here Running handlers complete
node.domain.goes.here [2016-12-13T13:51:26-05:00] ERROR: Exception handlers complete
node.domain.goes.here Chef Client failed. 0 resources updated in 01 seconds
node.domain.goes.here [2016-12-13T13:51:26-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
node.domain.goes.here [2016-12-13T13:51:26-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
node.domain.goes.here [2016-12-13T13:51:26-05:00] ERROR: 401 "Unauthorized"
node.domain.goes.here [2016-12-13T13:51:26-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[[email protected] chef]# cat client.rb
log_location STDOUT
chef_server_url "https:/chef/organizations/domain"
validation_client_name "domain-validator"
node_name "node"
ssl_verify_mode :verify_none
trusted_certs_dir "/etc/chef/trusted_certs"