Open Rocklviv opened 10 years ago
I have the same error on Ubuntu 14.04 but only when chef-client is run by init.d
[2014-10-25T12:15:19+02:00] ERROR: service[php-fpm] (php-fpm::install line 48) had an error: ArgumentError: invalid byte sequence in US-ASCII [2014-10-25T12:15:19+02:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Same here (Ubuntu 14.04, chef 11.16.4)
Error executing action `enable` on resource 'service[php-fpm]'
================================================================================
ArgumentError
-------------
invalid byte sequence in US-ASCII
Resource Declaration:
---------------------
# In /mnt/cookbooks/supermarket/php-fpm/recipes/install.rb
51: service "php-fpm" do
52: provider service_provider if service_provider
53: service_name php_fpm_service_name
54: supports :start => true, :stop => true, :restart => true, :reload => true
55: action [ :enable, :start ]
56: end
Compiled Resource:
------------------
# Declared in /mnt/cookbooks/supermarket/php-fpm/recipes/install.rb:51:in `from_file'
service("php-fpm") do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
supports {:start=>true, :stop=>true, :restart=>true, :reload=>true}
retries 0
retry_delay 2
guard_interpreter :default
service_name "php5-fpm"
pattern "php-fpm"
cookbook_name :"php-fpm"
recipe_name "install"
end
Solved, locales wasn't configured in my system. Including "locale::default" recipe in my run list, and seting LANG and LC_ALL in my base recipe fix the issue.
include_recipe "locale::default"
# set env vars
ENV["LANG"] = node["locale"]["lang"]
ENV["LC_ALL"] = node["locale"]["lang"]
@alambike: I tried your suggestion to set the LANG and LC_ALL at the begin of the default recipe on my Ubuntu 14.04 with Chef 11.16.4 but still have the same invalid byte sequence error on chef-run.
[2015-01-02T12:09:42+01:00] ERROR: Running exception handlers [2015-01-02T12:09:42+01:00] ERROR: Exception handlers complete [2015-01-02T12:09:42+01:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2015-01-02T12:09:42+01:00] INFO: Sending resource update report (run-id: adc8924f-1416-4dc9-852c-1283af1eb39a) [2015-01-02T12:09:42+01:00] ERROR: service[php-fpm] (php-fpm::install line 51) had an error: ArgumentError: invalid byte sequence in US-ASCII [2015-01-02T12:09:42+01:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) [2015-01-02T12:09:42+01:00] ERROR: Sleeping for 14400 seconds before trying again
@stisot are you using locale cookbook too?
I'm doing it in my base recipe and works ok
https://github.com/RIYIC/riyic/blob/master/recipes/_configure_locale.rb
For me this helped too.
A manual run fixed the locale - and after that I restarted the chef-client in the background so it will get new locale settings.
Thanks everyone.
When i'm trying to install php-fpm on Ubuntu 14.04 i get this error. Using Bento Ubuntu-14.04 box.