ruby – Chef没有运行apt(apt-get update)配方. Apt返回100
发布时间:2020-12-17 03:21:20 所属栏目:百科 来源:网络整理
导读:在vagrant上运行Ubuntu 11.04,mac os x 10.7.2.运行厨师服务器. 尝试安装postgresql社区厨师食谱,我得到以下错误,即使我的基本角色看起来像这样(我添加了apt配方尝试更新apt-get): name "base"description "The base role for systems"run_list( "recipe[ap
在vagrant上运行Ubuntu 11.04,mac os x 10.7.2.运行厨师服务器.
尝试安装postgresql社区厨师食谱,我得到以下错误,即使我的基本角色看起来像这样(我添加了apt配方尝试更新apt-get): name "base" description "The base role for systems" run_list( "recipe[apt]","recipe[vim]" ) 尝试做一个厨师运行: $vagrant reload db1dev [db1dev] Attempting graceful shutdown of linux... [db1dev] Preparing host only network... [db1dev] Clearing any previously set forwarded ports... [db1dev] Forwarding ports... [db1dev] -- ssh: 22 => 2222 (adapter 1) [db1dev] Cleaning previously set shared folders... [db1dev] Creating shared folders metadata... [db1dev] Running any VM customizations... [db1dev] Booting VM... [db1dev] Waiting for VM to boot. This can take a few minutes. [db1dev] VM booted and ready for use! [db1dev] Enabling host only network... [db1dev] Mounting shared folders... [db1dev] -- v-root: /vagrant [db1dev] Running provisioner: Vagrant::Provisioners::ChefClient... [db1dev] Creating folder to hold client key... [db1dev] Uploading chef client validation key... [db1dev] Generating chef JSON and uploading... [db1dev] Running chef-client... [db1dev] stdin: is not a tty : stderr [db1dev] [Thu,19 Jan 2012 21:44:45 -0800] INFO: *** Chef 0.10.2 *** : stdout [db1dev] [Thu,19 Jan 2012 21:44:46 -0800] INFO: Client key /etc/chef/client.pem is not present - registering : stdout [db1dev] [Thu,19 Jan 2012 21:44:46 -0800] INFO: HTTP Request Returned 404 Not Found: Cannot load node dev-vagrant-db1-andres : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Setting the run_list to ["role[base]","role[db_master]"] from JSON : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Run List is [role[base],role[db_master]] : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Run List expands to [base_server,vim,postgresql::server] : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Starting Chef Run for dev-vagrant-db1-andres : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Loading cookbooks [base_server,openssl,postgresql,vim] : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/resources/repository.rb from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/metadata.rb from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/providers/repository.rb from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/recipes/cacher.rb from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/recipes/cacher-client.rb from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/recipes/default.rb from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/metadata.json from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Removing cookbooks/apt/README.md from the cache; its cookbook is no longer needed on this client. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Storing updated cookbooks/base_server/recipes/default.rb in the cache. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Storing updated cookbooks/base_server/README.rdoc in the cache. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Storing updated cookbooks/base_server/metadata.rb in the cache. : stdout [db1dev] [Thu,19 Jan 2012 21:44:47 -0800] INFO: Processing package[postgresql-client] action install (postgresql::client line 37) : stdout [db1dev] [Thu,19 Jan 2012 21:44:48 -0800] ERROR: package[postgresql-client] (postgresql::client line 37) has had an error [Thu,19 Jan 2012 21:44:48 -0800] ERROR: Running exception handlers : stdout [db1dev] [Thu,19 Jan 2012 21:44:48 -0800] FATAL: Saving node information to /srv/chef/file_store/failed-run-data.json : stdout [db1dev] [Thu,19 Jan 2012 21:44:48 -0800] ERROR: Exception handlers complete : stdout [db1dev] [Thu,19 Jan 2012 21:44:48 -0800] FATAL: Stacktrace dumped to /srv/chef/file_store/chef-stacktrace.out : stdout [db1dev] [Thu,19 Jan 2012 21:44:48 -0800] FATAL: Chef::Exceptions::Exec: package[postgresql-client] (postgresql::client line 37) had an error: apt-get -q -y install postgresql-client=8.4.8-0ubuntu0.10.04 returned 100,expected 0 : stdout The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! chef-client -c /etc/chef/client.rb -j /etc/chef/dna.json The output of the command prior to failing is outputted below: [no output] 如果我从服务器内部手动执行$sudo apt-get更新,则执行另一次chef-client安装postgres没有问题.关于为什么apt配方没有运行的任何想法? (我也知道它没有运行,因为在ubuntu中没有创建apt-get的时间戳文件).任何帮助将非常感激. 解决方法
因此,从您打印的错误,似乎运行命令
apt-get -q -y install postgresql-client=8.4.8-0ubuntu0.10.04 失败了. 但你说如果你跑了 apt-get update 首先,然后重新提供,它工作正常吗? 我的预感是,当你第一次运行厨师时,你请求的postgresql客户端版本不在你下载的apt软件包列表中,但运行apt-get update会找到该版本. 我看到你首先运行base_server配方,是否将apt存储库添加到列表中? 无论如何,我建议在运行postgres配方之前运行apt-get更新,这可能适合放入我认为的base_server配方中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- jsoncpp在linux下的配置
- ruby-on-rails – 在Rails模型中设置和获取虚拟属
- fill_parent, wrap_content, match_parent的区别
- laravel ajax POST请求 错误 TokenMismatchExcep
- oracle备份 使用RMAN 工具
- ios – Swift:一个数组中的不同对象?
- XML解析乱码,UnmarshalException和 SAXParseExc
- 为什么FlexUnit中没有assertError()函数?
- ruby-on-rails-4 – Rails中双嵌套模型的未提供参
- vb与数据库(二)之迟到的学生信息管理系统总结
热点阅读