Vagrant 厨师从未成功完成

Vagrant 厨师从未成功完成,vagrant,chef-infra,chef-recipe,Vagrant,Chef Infra,Chef Recipe,Mac OS X 10.14.5(莫哈韦) VirtualBox 6.0.10 r132072 流浪汉2.2.5 流浪者盒子“bento/ubuntu-16.04”版本“201906.18.0” 更新了VirtualBox和Vagrant 摧毁并重建了流浪者的盒子 这刚刚开始,我重新安装了VirtualBox和Vagrant,更新了Vagrant框,但没有用: webdevMacMini-3:workspace Production2$ vagrant reload ==> d

Mac OS X 10.14.5(莫哈韦)

VirtualBox 6.0.10 r132072

流浪汉2.2.5

流浪者盒子“bento/ubuntu-16.04”版本“201906.18.0”

  • 更新了VirtualBox和Vagrant
  • 摧毁并重建了流浪者的盒子
这刚刚开始,我重新安装了VirtualBox和Vagrant,更新了Vagrant框,但没有用:

    webdevMacMini-3:workspace Production2$ vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Loading Berkshelf datafile...
==> default: Sharing cookbooks with VM
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'bento/ubuntu-16.04' version '201906.18.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Updating Vagrant's Berkshelf...
==> default: Resolving cookbook dependencies...
==> default: Fetching 'fsm-opsworks' from source at .
==> default: Using fsm-opsworks (0.1.0) from source at .
==> default: Using mysql (7.2.0)
==> default: Using rbac (1.0.3)
==> default: Using s3_file (2.8.5)
==> default: Using smf (2.2.8)
==> default: Using tar (0.7.0)
==> default: Using yum-mysql-community (4.0.1)
==> default: Vendoring fsm-opsworks (0.1.0) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/fsm-opsworks
==> default: Vendoring mysql (7.2.0) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/mysql
==> default: Vendoring rbac (1.0.3) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/rbac
==> default: Vendoring s3_file (2.8.5) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/s3_file
==> default: Vendoring smf (2.2.8) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/smf
==> default: Vendoring tar (0.7.0) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/tar
==> default: Vendoring yum-mysql-community (4.0.1) to /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default/yum-mysql-community
==> default: Using hostname "fsm-wp.env" as node name for Chef...
==> default: Using hostname "fsm-wp.env" as node name for Chef...
==> default: Fixed port collision for 80 => 80. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 2200 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] Writing the following entries to (/etc/hosts)
==> default: [vagrant-hostsupdater]   192.168.3.10  fsm-wp.env  # VAGRANT: 9c8c403ffecf0fd26e3d42e783a1c8b6 (default) / c43ab3ef-8862-4c71-80ed-63ee74e1f87c
==> default: [vagrant-hostsupdater] This operation requires administrative access. You may skip it by manually adding equivalent entries to the hosts file.
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
==> default: Mounting shared folders...
default: /tmp/vagrant-chef/f2698dd34370bffc552811ad1ca73223/nodes => /Users/Production2/Projects/fsm-wordpress/env
default: /tmp/vagrant-chef/1501064198d92cc9d39ef0e3346b2f11/cookbooks => /Users/Production2/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190815-3252-j0pts7-default
default: /tmp/vagrant-chef/b1edb4edf9fc67ca95b5d1baa3f4b0e9/cookbooks => /Users/Production2/Projects/fsm-wordpress/env/cookbooks
default: /tmp/vagrant-chef/f12914f42c32d7648a3031384102f521/data_bags => /Users/Production2/Projects/fsm-wordpress/env/data_bags
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
==> default: Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: Chef Infra Client cannot execute without accepting the license
Chef never successfully completed! Any errors should be visible in the 
output above. Please fix your recipes so that they properly complete.

我已经有一段时间没有更新任何食谱了,直到今天我也没有更新Vagrant或VirtualBox。任何洞察都将不胜感激

您的输出中有一行提示出了什么问题

==> default: Chef Infra Client cannot execute without accepting the license

  • 用户可以在其chef Infra客户端和chef Infra服务器配置中指定chef_许可证“接受”。在工作站上,可以在
    ~/.chef/config.rb
    ~/.chef/knife.rb
    中指定,在节点上,可以在
    /etc/chef/client.rb
    中指定

  • 当调用chef命令行工具并接受许可证时,用户还需要接受所有嵌入式产品的许可证。相同的许可证适用于所有产品,但每个产品必须有自己的许可证接受
    chef——chef license accept
    将接受chef Workstation、chef Infra客户端、chef InSpec和Push Jobs客户端的许可证。例如,
    chef env–chef license accept

  • 发布时,将生成接受的许可证文件

    $ ls -x1 ~/.chef/accepted_licenses/
    chef_infra_client
    chef_workstation
    inspec
    

    我的解决办法是增加

    chef.arguments=“--chef许可证接受”

    到底

    config.vm.provision“chef_solo”do | chef |


    my
    Vagarantgile
    中的块,如下所述:。谢谢@mr为我指明了正确的方向

    您可以使用以下命令接受厨师执照

    chef-client --chef-license accept  > /dev/null
    

    我运行了
    chef env–chef license accept
    ,现在我有了目录
    ~/.chef/accepted\u licenses
    ,其中现在包含了上面列出的文件,但我仍然收到了相同的错误。