Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error provisioning TDT: php should be recompiled? #14

Closed
pietercolpaert opened this issue Apr 16, 2015 · 7 comments
Closed

Error provisioning TDT: php should be recompiled? #14

pietercolpaert opened this issue Apr 16, 2015 · 7 comments

Comments

@pietercolpaert
Copy link
Member

==> tdt: [2015-04-16T12:13:13+00:00] INFO: execute[a2dismod mpm_prefork] sending reload action to service[apache2] (delayed)
==> tdt: [2015-04-16T12:13:13+00:00] INFO: execute[a2enmod mpm_event] sending restart action to service[apache2] (delayed)
==> tdt: [2015-04-16T12:13:13+00:00] ERROR: Running exception handlers
==> tdt: [2015-04-16T12:13:13+00:00] ERROR: Exception handlers complete
==> tdt: [2015-04-16T12:13:13+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> tdt: [2015-04-16T12:13:13+00:00] ERROR: Chef::Exceptions::MultipleFailures
==> tdt: 
==> tdt: ================================================================================
==> tdt: Error executing action `restart` on resource 'service[apache2]'
==> tdt: ================================================================================
==> tdt: 
==> tdt: 
==> tdt: Mixlib::ShellOut::ShellCommandFailed
==> tdt: ------------------------------------
==> tdt: Expected process to exit with [0], but received '1'
==> tdt: ---- Begin output of /etc/init.d/apache2 restart ----
==> tdt: STDOUT: * Restarting web server apache2
==> tdt:    ...fail!
==> tdt:  * The apache2 configtest failed.
==> tdt: STDERR: Output of config test was:
==> tdt: [Thu Apr 16 12:13:13.821998 2015] [:crit] [pid 10953:tid 139684336588672] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
==> tdt: AH00013: Pre-configuration failed
==> tdt: Action 'configtest' failed.
==> tdt: The Apache error log may have more information.
==> tdt: ---- End output of /etc/init.d/apache2 restart ----
==> tdt: Ran /etc/init.d/apache2 restart returned 1
==> tdt: 
==> tdt: 
==> tdt: Resource Declaration:
==> tdt: ---------------------
==> tdt: # In /tmp/vagrant-chef-4/chef-solo-2/cookbooks/tdt/recipes/default.rb
==> tdt: 
==> tdt:  66: service "apache2" do
==> tdt:  67:   supports :restart => true, :reload => true, :status => true
==> tdt:  68:   action [ :enable, :start ]
==> tdt:  69: end
==> tdt:  70: 
==> tdt: 
==> tdt: 
==> tdt: 
==> tdt: Compiled Resource:
==> tdt: ------------------
==> tdt: # Declared in /tmp/vagrant-chef-4/chef-solo-2/cookbooks/tdt/recipes/default.rb:66:in `from_file'
==> tdt: 
==> tdt: service("apache2") do
==> tdt:   provider Chef::Provider::Service::Debian
==> tdt:   action [:enable, :start]
==> tdt:   supports {:restart=>true, :reload=>true, :status=>true}
==> tdt:   retries 0
==> tdt:   retry_delay 2
==> tdt:   service_name "apache2"
==> tdt:   pattern "apache2"
==> tdt:   startup_type :automatic
==> tdt:   cookbook_name :tdt
==> tdt:   recipe_name "default"
==> tdt: end
==> tdt: 
==> tdt: 
==> tdt: 
==> tdt: [2015-04-16T12:11:36+00:00] INFO: Forking chef instance to converge...
==> tdt: [2015-04-16T12:13:13+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
@pietercolpaert
Copy link
Member Author

Fixed when installed php5-fpm and php5-mcrypt. Should probably be fixed in the recipes?

@pietercolpaert
Copy link
Member Author

After further research, I think it's due to this piece of code:

bash "Add PPA for latest PHP" do
  code <<-EOH
  sudo add-apt-repository ppa:ondrej/php5
  EOH
end

execute "apt-get update"

# install software we need that is not available in the Chef supermarket
%w(
libapache2-mod-php5
libssl-dev
mysql-server
php5-mcrypt
php5-mysql
php5-curl
php5-dev
php5-memcache
).each { | pkg | package pkg }

The problem is that the new sw repo cannot be authenticated. Is that possible?

@brechtvdv
Copy link
Contributor

Had also troubles with PHP needs to recompile.
That's why I've done:
execute "a2dismod mpm_event"
execute "a2enmod mpm_prefork"

The error was gone after you added php5-fpm?

@pietercolpaert
Copy link
Member Author

I still get this problem now with master... normal?

@brechtvdv
Copy link
Contributor

That's not normal.. Just clean installed, works...
Does this help:

vagrant destroy tdt
vagrant up tdt

@pietercolpaert
Copy link
Member Author

Still gives me

==> tdt: [2015-05-23T16:27:33+00:00] ERROR: package[libapache2-mod-php5](tdt::default line 47) had an error: Mixlib::ShellOut::ShellCommandFailed:
Expected process to exit with [0], but received '100'
==> tdt: ---- Begin output of apt-get -q -y install
libapache2-mod-php5=5.5.24+dfsg-1+deb.sury.org~trusty+1 ----

Op za 23 mei 2015 om 18:14 schreef Brecht Van de Vyvere <
[email protected]>:

That's not normal.. Just clean installed, works...
Does this help:

vagrant destroy tdt
vagrant up tdt


Reply to this email directly or view it on GitHub
#14 (comment).

@brechtvdv brechtvdv reopened this May 23, 2015
brechtvdv added a commit that referenced this issue Jun 2, 2015
Berkshelf provisioning - Fix #13 #14
@brechtvdv
Copy link
Contributor

Can you confirm @pietercolpaert that my latest version gives no errors?
I already asked @Dobbelsteen to check and he had no problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants