sous-chefs/php

Crash on php_pear channel update on Centos 7.2 box

Closed this issue · 5 comments

Trying to update the pear channel on a virtualbox centos 7.2 box vagrant.up crashes...

probably closed #105 could be the same

php_pear_channel[pear.php.net] action update[2016-02-26T01:41:41+00:00] INFO: Processing php_pear_channel[pear.php.net] action update (streaming_base::install_owncloud_php_prerequisites line 8)
==> default:
==> default:
==> default: ================================================================================
==> default: Error executing action update on resource 'php_pear_channel[pear.php.net]'
==> default: ================================================================================
==> default:
==> default: Errno::ENOENT
==> default: -------------
==> default: No such file or directory - pear
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /vagrant/chef/cookbooks/berks/php/providers/pear_channel.rb:87:in exists?' ==> default: /vagrant/chef/cookbooks/berks/php/providers/pear_channel.rb:50:inblock in class_from_file'
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /vagrant/chef/cookbooks/core/streaming_base/recipes/install_owncloud_php_prerequisites.rb
==> default:
==> default: 8: php_pear_channel 'pear.php.net' do
==> default: 9: action :update
==> default: 10: end
==> default: 11:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /vagrant/chef/cookbooks/core/streaming_base/recipes/install_owncloud_php_prerequisites.rb:8:in `from_file'
==> default:
==> default: php_pear_channel("pear.php.net") do
==> default: action [:update]
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :php_pear_channel
==> default: cookbook_name :streaming_base
==> default: recipe_name "install_owncloud_php_prerequisites"
==> default: channel_name "pear.php.net"
==> default: end

I'm having the same issue.

==> default: Running handlers:
==> default: [2016-04-01T03:31:03+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: 
==> default: [2016-04-01T03:31:03+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 76 resources updated in 13 minutes 58 seconds
==> default: [2016-04-01T03:31:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-04-01T03:31:03+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2016-04-01T03:31:03+00:00] ERROR: php_pear_channel[pear.php.net] (php::default line 25) had an error: Errno::ENOENT: No such file or directory - pear
==> default: [2016-04-01T03:31:03+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Same issue on redhat 7.2 (aws instance) and chef 12 (opsworks)

[2016-06-23T05:27:28-04:00] ERROR: Running exception handlers
[2016-06-23T05:27:28-04:00] ERROR: Exception handlers complete
[2016-06-23T05:27:28-04:00] FATAL: Stacktrace dumped to /var/chef/runs/111a8823-ade4-4be4-b6a2-6973e447698a/local-mode-cache/cache/chef-stacktrace.out
[2016-06-23T05:27:28-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-06-23T05:27:28-04:00] ERROR: php_pear_channel[pear.php.net](php::default line 25) had an error: Errno::ENOENT: No such file or directory - pear
[2016-06-23T05:27:28-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

My guess is that Pear is not found in the $PATH. It could be that the CentOS and RHEL attributes may need to be adjusted for 7.2. If you log into the server and run which pear after attempting to run the recipe, does it return anything? If the file is in the $PATH, do you get the same error when you set node['php']['pear'] to the full file path?

It could be another cookbook altering the $PATH variable, if the tests for this cookbook are passing. Do you have other recipes that could be disrupting the $PATH variable?

As @ThatGerber mentions, it seems like pear isn't in the path, and maybe there is a missing include_recipe 'php' in the recipe that is used?

If I clone the current source and do a kitchen converge for the centos 7 platform, I get a clean install:

+

Recipe: php::default

  • php_pear_channel[pear.php.net] action update
    • update pear channel php_pear_channel[pear.php.net]
  • php_pear_channel[pecl.php.net] action update
    • update pear channel php_pear_channel[pecl.php.net]

Running handlers:
Running handlers complete
Chef Client finished, 6/7 resources updated in 01 minutes 08 seconds
Finished converging (1m14.30s).
-----> Kitchen is finished. (2m22.03s)

As this is an older issue, I'm going to go ahead and close this. If you are still having problems, please open and provide additional information. Thanks!

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.