创建内容运行时失败
Failure when creating Content Runtime
当我尝试部署 Content Runtime 时失败并出现错误:
null_resource.singlenode (remote-exec): ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
null_resource.singlenode (remote-exec): Creating admin user: chef-admin
null_resource.singlenode: Still creating... (8m30s elapsed)
null_resource.singlenode (remote-exec): ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
Error applying plan:
我在尝试使用 vSphere 或其他模板创建内容运行时时看到此错误。可能是什么原因?
这看起来像是安装 Chef 时出现的问题。 运行 失败虚拟机上的命令:
~/advanced-content-runtime/verify-installation.sh
并检查结果。
该命令将指示 chef 失败,但会向您显示 chef 安装日志的位置:
~/advanced-content-runtime/.advanced-runtime-config/chef-install.log
然后检查日志中的关键:
egrep pivotal ~/advanced-content-runtime/.advanced-runtime-config/chef-install.log
在正确安装了 chef 的系统上,使用上述命令看到的结果是:
[2017-11-07T16:44:10-06:00] INFO: Storing updated cookbooks/private-chef/templates/default/pivotal.rb.erb in the cache.
[2017-11-07T16:44:13-06:00] INFO: Processing file[/etc/opscode/pivotal.pem] action create (private-chef::private_keys line 33)
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] created file /etc/opscode/pivotal.pem
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] updated file contents /etc/opscode/pivotal.pem
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] owner changed to 999
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] group changed to 0
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] mode changed to 600
[2017-11-07T16:47:51-06:00] INFO: Processing template[/etc/opscode/pivotal.rb] action create (private-chef::ctl_config line 32)
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] created file /etc/opscode/pivotal.rb
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] updated file contents /etc/opscode/pivotal.rb
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] owner changed to 0
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] group changed to 0
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] mode changed to 644
通过查看 Chef 日志,您可能会发现一个失败的 Chef 配置,特别是这个问题:https://github.com/chef/chef-server/issues/987。
您可以清理 chef 安装 (chef-server-ctl cleanse
),然后启动命令行以成功完成安装。从 CAM 的角度来看,您可以重新提交内容运行时的 other
模板创建,然后 VM 将变得可用并为 CAM 所知。
当我尝试部署 Content Runtime 时失败并出现错误:
null_resource.singlenode (remote-exec): ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
null_resource.singlenode (remote-exec): Creating admin user: chef-admin
null_resource.singlenode: Still creating... (8m30s elapsed)
null_resource.singlenode (remote-exec): ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
Error applying plan:
我在尝试使用 vSphere 或其他模板创建内容运行时时看到此错误。可能是什么原因?
这看起来像是安装 Chef 时出现的问题。 运行 失败虚拟机上的命令:
~/advanced-content-runtime/verify-installation.sh
并检查结果。
该命令将指示 chef 失败,但会向您显示 chef 安装日志的位置:
~/advanced-content-runtime/.advanced-runtime-config/chef-install.log
然后检查日志中的关键:
egrep pivotal ~/advanced-content-runtime/.advanced-runtime-config/chef-install.log
在正确安装了 chef 的系统上,使用上述命令看到的结果是:
[2017-11-07T16:44:10-06:00] INFO: Storing updated cookbooks/private-chef/templates/default/pivotal.rb.erb in the cache.
[2017-11-07T16:44:13-06:00] INFO: Processing file[/etc/opscode/pivotal.pem] action create (private-chef::private_keys line 33)
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] created file /etc/opscode/pivotal.pem
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] updated file contents /etc/opscode/pivotal.pem
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] owner changed to 999
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] group changed to 0
[2017-11-07T16:44:13-06:00] INFO: file[/etc/opscode/pivotal.pem] mode changed to 600
[2017-11-07T16:47:51-06:00] INFO: Processing template[/etc/opscode/pivotal.rb] action create (private-chef::ctl_config line 32)
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] created file /etc/opscode/pivotal.rb
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] updated file contents /etc/opscode/pivotal.rb
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] owner changed to 0
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] group changed to 0
[2017-11-07T16:47:51-06:00] INFO: template[/etc/opscode/pivotal.rb] mode changed to 644
通过查看 Chef 日志,您可能会发现一个失败的 Chef 配置,特别是这个问题:https://github.com/chef/chef-server/issues/987。
您可以清理 chef 安装 (chef-server-ctl cleanse
),然后启动命令行以成功完成安装。从 CAM 的角度来看,您可以重新提交内容运行时的 other
模板创建,然后 VM 将变得可用并为 CAM 所知。