我已经从“分销商”中放置了crt密钥,然后检查并成功。但“刀食谱上传”失败。
- Chef 服务器
- 主机名:“分销商”
- Cent OS 7
- chef-服务器-核心-12.4.1-1.el7.x86_64
- 工作台(厨房)
- 主机名:“工作站”
- Cent OS 7
- chefdk-0.11.2-1.el7.x86_64.rpm
为什么认证失败?解决方法是什么?
[account@Workstation chef-repo]$ knife ssl check
Connecting to host Distributor:443
Successfully verified certificates from `Distributor'
[account@Workstation chef-repo]$ knife cookbook list
[account@Workstation chef-repo]$ knife cookbook upload example
Uploading example [1.0.0]
ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate
ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-92a639ad39af9c4f51d46b7bfcf69bb6?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=N8Pih1UY1rt1vGTVvlLoZFG0oMQ%3D, retry 1/5
ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate
ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-2379ce6d82f773a3ce050c87b32c4c7d?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=2wMxcjUAEd7lMNQ/RwZv30/ssbk%3D, retry 1/5
ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate
ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-2645d8b91137912a590407fa530be964?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=F6uDdJFzlAgV9vBlK92Sf7RLWck%3D, retry 1/5
ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate
ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-f7e821e5c5e80279c1cb09315ca6e43a?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=1NUEjokCCmhZ%2BRA/RUxWHGx8QvM%3D, retry 1/5
答案1
看起来你在knife.rb
检查时选择了错误的 .pem 文件knife.rb
,并检查你的密钥是否正确。它应该看起来像这样(在你的里面knife.rb
)
client_key "#{current_dir}/yourkey.pem"
答案2
通过安装较新的 Chef Server Core 解决了该问题。