0

A few hours ago all my OpsWorks stacks started failing to update_custom_cookbooks. They are all failing on "Install the cookbooks specified in the Berksfile and their dependencies" with the error: in `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError).

Our OpsWorks stack is using chef version 11.10, Berkshelf version 3.1.3 and Ubuntu 14.04 instances.

Berksfile: for testing purposes I replaced our normal file with the following and I'm still getting the same error:

source "https://supermarket.getchef.com"

cookbook 'apt'

Here is a portion of the error log from OpsWorks:

================================================================================
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
Peter M
  • 953
  • 2
  • 14
  • 27

1 Answers1

0

Peter, this might be due to the way encoding is being handled / not:

enter link description here

DonBecker
  • 250
  • 2
  • 10