首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OpsWorks Berksfile文件处理失败:(编码:InvalidByteSequenceError)

OpsWorks Berksfile文件处理失败:(编码:InvalidByteSequenceError)
EN

Server Fault用户
提问于 2014-10-30 22:14:21
回答 1查看 859关注 0票数 0

几个小时前,我所有的OpsWorks堆栈都开始无法实现update_custom_cookbooks。它们在“安装Berksfile中指定的食谱及其依赖项”时都失败了,错误是:在US-ASCII上的‘`encode':"\xC3“(编码::InvalidByteSequenceError)。

我们的OpsWorks堆栈使用的是厨师版本11.10、Berk大陆架版本3.1.3和Ubuntu14.04实例。

Berksfile:出于测试的目的,我用下面的代码替换了我们的普通文件,但仍然得到了相同的错误:

代码语言:javascript
复制
source "https://supermarket.getchef.com"

cookbook 'apt'

下面是OpsWorks错误日志的一部分:

代码语言:javascript
复制
================================================================================
Error executing action `run` on resource 'ruby_block[Install the cookbooks specified in the Berksfile and their dependencies]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
STDOUT: Resolving cookbook dependencies...
Fetching cookbook index from https://supermarket.getchef.com...
STDERR: /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `initialize'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `new'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `parse'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/ridley-4.0.0/lib/ridley/chef/cookbook/metadata.rb:458:in `from_json'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/ridley-4.0.0/lib/ridley/chef/cookbook/metadata.rb:29:in `from_json'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/ridley-4.0.0/lib/ridley/chef/cookbook.rb:36:in `from_path'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cached_cookbook.rb:15:in `from_store_path'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cookbook_store.rb:108:in `block in cookbooks'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cookbook_store.rb:98:in `collect'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cookbook_store.rb:98:in `cookbooks'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/resolver/graph.rb:8:in `populate_store'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/resolver.rb:73:in `resolve'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/installer.rb:170:in `install_from_universe'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/installer.rb:39:in `run'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/berksfile.rb:371:in `install'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/berksfile.rb:590:in `vendor'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cli.rb:387:in `vendor'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cli.rb:52:in `dispatch'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/lib/berkshelf/cli.rb:27:in `execute!'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.1.3/bin/berks:5:in `<top (required)>'
from /opt/aws/opsworks/local/bin/berks:23:in `load'
from /opt/aws/opsworks/local/bin/berks:23:in `<main>'
---- End output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
Ran /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks returned 1
EN

回答 1

Server Fault用户

发布于 2014-12-03 18:13:55

Peter,这可能是由于编码的处理方式/不是:

在这里输入链接描述

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/641008

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档