- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个似乎与此类似的问题:Berkshelf cookbooks are not being copied to the Vagrant directory , 但我相信它是不同的。
当我运行一个 vagrant provision 时,它失败了,声称它无法加载它尝试的第一本 Recipe :
==> default: [2014-09-02T12:43:07+00:00] ERROR: Cookbook apt not found. If you're loading apt fr
om another cookbook, make sure you configure the dependency in your metadata
加载时,我看到了正在安装适当共享文件夹的消息:
==> default: Mounting shared folders...
default: /var/www => D:/Rob/VMs/vdd/data
default: /vagrant => D:/Rob/VMs/vdd
default: /tmp/vagrant-chef-3/chef-solo-2/roles => D:/Rob/VMs/vdd/chef/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/29007/.berkshelf/default/vagr
ant/berkshelf-20140822-13996-1eqat7m-default
default: /tmp/vagrant-chef-3/chef-solo-3/data_bags => D:/Rob/VMs/vdd/chef/data_bags
而且它们确实存在:
vagrant@vagrant-ubuntu-trusty-64:/tmp/vagrant-chef-3/chef-solo-1/cookbooks$ pwd
/tmp/vagrant-chef-3/chef-solo-1/cookbooks
vagrant@vagrant-ubuntu-trusty-64:/tmp/vagrant-chef-3/chef-solo-1/cookbooks$ ls
apache2 chef-sugar logrotate php yum
apt database my-cookbook postgresql yum-epel
aws dmg mysql runit yum-mysql-community
Berksfile.lock git mysql-chef_gem windows
build-essential iis openssl xfs
chef_handler iptables pacman xml
我的猜测是,这不是试图从该位置加载它们,而是从主机上的 vagrant 目录中的 Recipe 加载它们。但是,我在那里也有所有这些 Recipe 的副本(我打算对其进行配置,使其不依赖于 Berkshelf)。
这是我的 solo.rb 中的 Recipe 配置(挂载为/vagrant/chef/solo.rb):
cookbook_path ["/vagrant/chef/cookbooks/berks", "/vagrant/chef/cookbooks/core", "/vagrant/chef/cookbooks/custom"]
似乎我的 solo.rb 文件没有被读取?
更新Tensibai 在下面的评论中要求提供更完整的日志,所以这里是:
D:\Rob\VMs\vdd>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
Skipping Berkshelf with --no-provision
==> 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: 35729 => 35729 (adapter 1)
default: 8983 => 8983 (adapter 1)
default: 22 => 2222 (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: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /var/www => D:/Rob/VMs/vdd/data
default: /vagrant => D:/Rob/VMs/vdd
default: /tmp/vagrant-chef-3/chef-solo-2/roles => D:/Rob/VMs/vdd/chef/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/29007/.berkshelf/default/vagr
ant/berkshelf-20140822-13996-1eqat7m-default
default: /tmp/vagrant-chef-3/chef-solo-3/data_bags => D:/Rob/VMs/vdd/chef/data_bags
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.
D:\Rob\VMs\vdd>vagrant provision
Updating Vagrant's berkshelf: 'C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1399
6-1eqat7m-default'
Resolving cookbook dependencies...
Fetching 'my-cookbook' from source at .
Using apache2 (2.0.0)
Using apt (2.5.3)
Using aws (2.4.0)
Using build-essential (2.0.6)
Using chef-sugar (2.2.0)
Using chef_handler (1.1.6)
Using database (2.3.0)
Using dmg (2.2.0)
Using git (4.0.2)
Using iis (2.1.2)
Using iptables (0.14.0)
Using logrotate (1.6.0)
Using my-cookbook (0.1.0) from source at .
Using mysql (5.4.4)
Using mysql-chef_gem (0.0.2)
Using openssl (2.0.0)
Using pacman (1.1.1)
Using php (1.4.6)
Using postgresql (3.4.2)
Using runit (1.5.10)
Using windows (1.34.2)
Using xfs (1.1.0)
Using xml (1.2.6)
Using yum (3.2.4)
Using yum-epel (0.4.0)
Using yum-mysql-community (0.1.10)
Vendoring apache2 (2.0.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-
1eqat7m-default/apache2
Vendoring apt (2.5.3) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/apt
Vendoring aws (2.4.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/aws
Vendoring build-essential (2.0.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-2014082
2-13996-1eqat7m-default/build-essential
Vendoring chef-sugar (2.2.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-139
96-1eqat7m-default/chef-sugar
Vendoring chef_handler (1.1.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1
3996-1eqat7m-default/chef_handler
Vendoring chef_handler (1.1.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1
3996-1eqat7m-default/chef_handler
Vendoring database (2.3.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996
-1eqat7m-default/database
Vendoring dmg (2.2.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/dmg
Vendoring git (4.0.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/git
Vendoring iis (2.1.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/iis
Vendoring iptables (0.14.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1399
6-1eqat7m-default/iptables
Vendoring logrotate (1.6.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-1399
6-1eqat7m-default/logrotate
Vendoring my-cookbook (0.1.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13
996-1eqat7m-default/my-cookbook
Vendoring mysql (5.4.4) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1e
qat7m-default/mysql
Vendoring mysql-chef_gem (0.0.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822
-13996-1eqat7m-default/mysql-chef_gem
Vendoring openssl (2.0.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-
1eqat7m-default/openssl
Vendoring pacman (1.1.1) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1
eqat7m-default/pacman
Vendoring php (1.4.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/php
Vendoring postgresql (3.4.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-139
96-1eqat7m-default/postgresql
Vendoring runit (1.5.10) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1
eqat7m-default/runit
Vendoring windows (1.34.2) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996
-1eqat7m-default/windows
Vendoring xfs (1.1.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/xfs
Vendoring xml (1.2.6) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/xml
Vendoring yum (3.2.4) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996-1eqa
t7m-default/yum
Vendoring yum-epel (0.4.0) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20140822-13996
-1eqat7m-default/yum-epel
Vendoring yum-mysql-community (0.1.10) to C:/Users/29007/.berkshelf/default/vagrant/berkshelf-20
140822-13996-1eqat7m-default/yum-mysql-community
==> default: Running provisioner: shell...
default: Running: C:/Users/29007/AppData/Local/Temp/vagrant-shell20140902-9376-m72i1a.sh
==> default: stdin: is not a tty
==> default: +--------------------------------------+
==> default: | |
==> default: | ooooo oooo ooooooooo ooooooooo |
==> default: | 888 88 888 88o 888 88o |
==> default: | 888 88 888 888 888 888 |
==> default: | 88888 888 888 888 888 |
==> default: | 888 o888ooo88 o888ooo88 |
==> default: | |
==> default: +--------------------------------------+
==> default: Updating Chef to 11.12.4 version. This may take a few minutes...
==> default: Running provisioner: chef_solo...
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2014-09-02T23:42:57+00:00] INFO: Forking chef instance to converge...
==> default: [2014-09-02T23:42:57+00:00] INFO: *** Chef 11.12.4 ***
==> default: [2014-09-02T23:42:57+00:00] INFO: Chef-client pid: 3195
==> default: [2014-09-02T23:43:05+00:00] INFO: Setting the run_list to ["role[vdd]"] from CLI op
tions
==> default: [2014-09-02T23:43:05+00:00] INFO: Run List is [role[vdd]]
==> default: [2014-09-02T23:43:05+00:00] INFO: Run List expands to [apt, apache2, mysql::client,
mysql::server, vdd::apache, vdd::graphviz, vdd::vdd_sites, vdd::php, vdd::uploadprogress, vdd::
mailcatcher, vdd::phpmyadmin, vdd::mysql, vdd::xdebug, vdd::git, vdd::webgrind, vdd::mc, vdd::ap
c, vdd::rsync, vdd::curl, vdd::composer, vdd::drush, vdd::vdd_help, vdd::vim, vdd::patchutils, v
dd::siege, vdd_example, desktop_tools]
==> default: [2014-09-02T23:43:05+00:00] INFO: Starting Chef Run for vagrant-ubuntu-trusty-64
==> default: [2014-09-02T23:43:05+00:00] INFO: Running start handlers
==> default: [2014-09-02T23:43:05+00:00] INFO: Start handlers complete.
==> default: [2014-09-02T23:43:06+00:00] ERROR: Running exception handlers
==> default: [2014-09-02T23:43:06+00:00] ERROR: Exception handlers complete
==> default: [2014-09-02T23:43:06+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stackt
race.out
==> default: [2014-09-02T23:43:06+00:00] ERROR: Cookbook apt not found. If you're loading apt fr
om another cookbook, make sure you configure the dependency in your metadata
==> default: [2014-09-02T23:43:06+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run p
rocess exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
最佳答案
经过一些研究后,我认为您的问题可能来自 HERE
vagrant-berkshelf 插件看起来有一些 ENV 变量来获取 chef 配置,如果我理解正确,它将覆盖您之前使用的任何 chef-solo 配置。
要查明所有这一切的根本原因,最好的办法是运行 vagrant 并将 VAGRANT_LOG 环境变量设置为 info set VAGRANT_LOG=info
然后 vagrant provision
您应该能够获取生成的 client.rb 文件的确切位置,以便在 VM 中检查它并查看用于 cookbook 的路径。
希望对你有帮助
关于Vagrant Chef solo 无法访问 Recipe ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25623959/
我通过 spring ioc 编写了一些 Rest 应用程序。但我无法解决这个问题。这是我的异常(exception): org.springframework.beans.factory.BeanC
我对 TestNG、Spring 框架等完全陌生,我正在尝试使用注释 @Value通过 @Configuration 访问配置文件注释。 我在这里想要实现的目标是让控制台从配置文件中写出“hi”,通过
为此工作了几个小时。我完全被难住了。 这是 CS113 的实验室。 如果用户在程序(二进制计算器)结束时选择继续,我们需要使用 goto 语句来到达程序的顶部。 但是,我们还需要释放所有分配的内存。
我正在尝试使用 ffmpeg 库构建一个小的 C 程序。但是我什至无法使用 avformat_open_input() 打开音频文件设置检查错误代码的函数后,我得到以下输出: Error code:
使用 Spring Initializer 创建一个简单的 Spring boot。我只在可用选项下选择 DevTools。 创建项目后,无需对其进行任何更改,即可正常运行程序。 现在,当我尝试在项目
所以我只是在 Mac OS X 中通过 brew 安装了 qt。但是它无法链接它。当我尝试运行 brew link qt 或 brew link --overwrite qt 我得到以下信息: ton
我在提交和 pull 时遇到了问题:在提交的 IDE 中,我看到: warning not all local changes may be shown due to an error: unable
我跑 man gcc | grep "-L" 我明白了 Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more inf
我有一段代码,旨在接收任何 URL 并将其从网络上撕下来。到目前为止,它运行良好,直到有人给了它这个 URL: http://www.aspensurgical.com/static/images/a
在过去的 5 个小时里,我一直在尝试在我的服务器上设置 WireGuard,但在完成所有设置后,我无法 ping IP 或解析域。 下面是服务器配置 [Interface] Address = 10.
我正在尝试在 GitLab 中 fork 我的一个私有(private)项目,但是当我按下 fork 按钮时,我会收到以下信息: No available namespaces to fork the
我这里遇到了一些问题。我是 node.js 和 Rest API 的新手,但我正在尝试自学。我制作了 REST API,使用 MongoDB 与我的数据库进行通信,我使用 Postman 来测试我的路
下面的代码在控制台中给出以下消息: Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child el
我正在尝试调用一个新端点来显示数据,我意识到在上一组有效的数据中,它在数据周围用一对额外的“[]”括号进行控制台,我认为这就是问题是,而新端点不会以我使用数据的方式产生它! 这是 NgFor 失败的原
我正在尝试将我的 Symfony2 应用程序部署到我的 Azure Web 应用程序,但遇到了一些麻烦。 推送到远程时,我在终端中收到以下消息 remote: Updating branch 'mas
Minikube已启动并正在运行,没有任何错误,但是我无法 curl IP。我在这里遵循:https://docs.traefik.io/user-guide/kubernetes/,似乎没有提到关闭
每当我尝试docker组成任何项目时,都会出现以下错误。 我尝试过有和没有sudo 我在这台机器上只有这个问题。我可以在Mac和Amazon WorkSpace上运行相同的容器。 (myslabs)
我正在尝试 pip install stanza 并收到此消息: ERROR: No matching distribution found for torch>=1.3.0 (from stanza
DNS 解析看起来不错,但我无法 ping 我的服务。可能是什么原因? 来自集群中的另一个 Pod: $ ping backend PING backend.default.svc.cluster.l
我正在使用Hibernate 4 + Spring MVC 4当我开始 Apache Tomcat Server 8我收到此错误: Error creating bean with name 'wel
我是一名优秀的程序员,十分优秀!