Octal Error when resolving cookbook dependencies


#1

When trying to converge cookbooks, I get an octal error and haven't been able to determine its cause. The error is:

   Resolving cookbook dependencies with Berkshelf 7.0.6...

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #converge action: ["\x80\x00\x00\x00`\x12\x95," is not an octal string]

A similar error can also been seen when I try to resolve dependencies with Berkshelf:

$ berks install
Resolving cookbook dependencies...
Fetching cookbook index from https://supermarket.chef.io...
Using windows (5.1.3)
ArgumentError "\x80\x00\x00\x00`\x12\x95," is not an octal string

I'm running on Ubuntu 14.04 and Chef version:
Chef Version:
$ chef --version
Chef Development Kit Version: 3.0.36
chef-client version: 14.1.12
delivery version: master (7206afaf4cf29a17d2144bb39c55b7212cfafcc7)
berks version: 7.0.2
kitchen version: 1.21.2
inspec version: 2.1.72

One weird thing that I'm noticing is that the dependencies are being resolved with Berkshelf 7.0.6 but Chef thinks that 7.0.2 is installed. Not sure whether that's a real issue or a red herring. Any ideas on how to debug/resolved?

Thank you!


#2

See https://github.com/berkshelf/berkshelf/issues/1744.

I believe it's fixed in the latest version of mixlib-archive. Either that or downgrade your version of rubygems.

Although it was supposedly fixed in chef-dk 3.0: https://github.com/chef/chef-dk/issues/1549, so maybe it's not the same issue...


#3

I'm going to point the obvious, but if you weren't able to fix it with the the answer from @gravesb, try running it with the -d flag, so you can have a better idea on whats going on.


#4

Thanks for the info @lucasslima and @gravesb! Here's the info:

ArgumentError "\x80\x00\x00\x00`\x12\x95," is not an octal string
/usr/lib/ruby/2.4.0/rubygems/package/tar_header.rb:128:in `strict_oct'
/usr/lib/ruby/2.4.0/rubygems/package/tar_header.rb:108:in `from'
/usr/lib/ruby/2.4.0/rubygems/package/tar_reader.rb:59:in `each'
/var/lib/gems/2.4.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive/tar.rb:28:in `block in extract'
/usr/lib/ruby/2.4.0/rubygems/package/tar_reader.rb:29:in `new'
/var/lib/gems/2.4.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive/tar.rb:145:in `reader'
/var/lib/gems/2.4.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive/tar.rb:26:in `extract'
/var/lib/gems/2.4.0/gems/mixlib-archive-0.4.18/lib/mixlib/archive.rb:47:in `extract'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/community_rest.rb:15:in `unpack'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/community_rest.rb:94:in `download'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:71:in `try_download'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:41:in `block in download'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:40:in `each'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/downloader.rb:40:in `download'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/installer.rb:108:in `install'
/var/lib/gems/2.4.0/gems/berkshelf-7.0.6/lib/berkshelf/installer.rb:181:in `block (2 levels) in install_from_universe'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `block in synchronize'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb:19:in `execute'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/ivar.rb:170:in `safe_execute'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/future.rb:52:in `block in execute'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
/var/lib/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'

This fails on gem version 2.6.14.1 but works for me with version 2.7.6.


#5

You may want to try upgrading to the latest ChefDK which includes several important updates for archive handling.

-Tim