{"action":"opened","issue":{"url":"https://api.github.com/repos/svanzoest-cookbooks/apache2/issues/355","labels_url":"https://api.github.com/repos/svanzoest-cookbooks/apache2/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/svanzoest-cookbooks/apache2/issues/355/comments","events_url":"https://api.github.com/repos/svanzoest-cookbooks/apache2/issues/355/events","html_url":"https://github.com/svanzoest-cookbooks/apache2/issues/355","id":75199880,"number":355,"title":"Apache restart triggered by mpm_prefork fails","user":{"login":"phpPhil","id":4443862,"avatar_url":"https://avatars.githubusercontent.com/u/4443862?v=3","gravatar_id":"","url":"https://api.github.com/users/phpPhil","html_url":"https://github.com/phpPhil","followers_url":"https://api.github.com/users/phpPhil/followers","following_url":"https://api.github.com/users/phpPhil/following{/other_user}","gists_url":"https://api.github.com/users/phpPhil/gists{/gist_id}","starred_url":"https://api.github.com/users/phpPhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpPhil/subscriptions","organizations_url":"https://api.github.com/users/phpPhil/orgs","repos_url":"https://api.github.com/users/phpPhil/repos","events_url":"https://api.github.com/users/phpPhil/events{/privacy}","received_events_url":"https://api.github.com/users/phpPhil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-11T12:09:39Z","updated_at":"2015-05-11T12:09:39Z","closed_at":null,"body":"I just came across an issue which is possibly related with other mpm issues I read about on this tracker, especially #333 and possibly #354.\r\nWhen setting `mpm => prefork` apache fails to restart itself after `a2enmod mpm_prefork`. \r\n\r\nInteresting is there's nothing in stdout and stderr or anything relevant in the apache logs that could indicate what actually went wrong.\r\n\r\nThese are the logs:\r\n\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] INFO: execute[a2enmod mpm_prefork] sending restart action to service[apache2] (delayed)\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] INFO: Processing service[apache2] action restart (apache2::default line 202)\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] supports status, running\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] is running\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 0, action stop, priority 09\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 1, action stop, priority 09\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 2, action start, priority 91\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 3, action start, priority 91\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 4, action start, priority 91\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 5, action start, priority 91\r\n\t\t==> my-server: [2015-05-10T12:05:25+10:00] DEBUG: service[apache2] runlevel 6, action stop, priority 09\r\n\t\t==> my-server: ================================================================================\r\n\t\t==> my-server: Error executing action `restart` on resource 'service[apache2]'\r\n\t\t==> my-server: ================================================================================\r\n\t\t==> my-server: Mixlib::ShellOut::ShellCommandFailed\r\n\t\t==> my-server: ------------------------------------\r\n\t\t==> my-server: Expected process to exit with [0], but received '1'\r\n\t\t==> my-server: ---- Begin output of /etc/init.d/apache2 restart ----\r\n\t\t==> my-server: STDOUT: * Restarting web server apache2\r\n\t\t==> my-server:    ...fail!\r\n\t\t==> my-server: STDERR: \r\n\t\t==> my-server: ---- End output of /etc/init.d/apache2 restart ----\r\n\t\t==> my-server: Ran /etc/init.d/apache2 restart returned 1\r\n\t\t==> my-server: Resource Declaration:\r\n\t\t==> my-server: ---------------------\r\n\t\t==> my-server: # In /tmp/vagrant-chef-2/chef-solo-1/cookbooks/apache2/recipes/default.rb\r\n\t\t==> my-server: 202: service 'apache2' do\r\n\t\t==> my-server: 203:   service_name node['apache']['service_name']\r\n\t\t==> my-server: 204:   case node['platform_family']\r\n\t\t==> my-server: 205:   when 'rhel'\r\n\t\t==> my-server: 206:     reload_command '/sbin/service httpd graceful'\r\n\t\t==> my-server: 207:   when 'debian'\r\n\t\t==> my-server: 208:     provider Chef::Provider::Service::Debian\r\n\t\t==> my-server: 209:   when 'arch'\r\n\t\t==> my-server: 210:     service_name 'httpd'\r\n\t\t==> my-server: 211:   end\r\n\t\t==> my-server: 212:   supports [:start, :restart, :reload, :status]\r\n\t\t==> my-server: Compiled Resource:\r\n\t\t==> my-server: ------------------\r\n\t\t==> my-server: # Declared in /tmp/vagrant-chef-2/chef-solo-1/cookbooks/apache2/recipes/default.rb:202:in `from_file'\r\n\t\t==> my-server: service(\"apache2\") do\r\n\t\t==> my-server:   provider Chef::Provider::Service::Debian\r\n\t\t==> my-server:   action [:enable, :start]\r\n\t\t==> my-server:   updated true\r\n\t\t==> my-server:   supports {:restart=>true, :reload=>true, :status=>true, :start=>true}\r\n\t\t==> my-server:   retries 0\r\n\t\t==> my-server:   retry_delay 2\r\n\t\t==> my-server:   default_guard_interpreter :default\r\n\t\t==> my-server:   service_name \"apache2\"\r\n\t\t==> my-server:   enabled true\r\n\t\t==> my-server:   running true\r\n\t\t==> my-server:   pattern \"apache2\"\r\n\t\t==> my-server:   declared_type :service\r\n\t\t==> my-server:   cookbook_name :apache2\r\n\t\t==> my-server:   recipe_name \"default\"\r\n\t\t==> my-server:   only_if \"/usr/sbin/apache2 -t\"\r\n\t\t==> my-server: end\r\n\r\nWorth noting...\r\n* when I log into the machine after the process aborts, I can restart Apache without any issues.\r\n* this is on AWS, I'm using the Ubuntu AMI `ami-d05e75b8`, Apache/2.4.7 (Ubuntu)\r\n\r\nThe error stops the provisioning half way through. \r\nIs there any workaround for this?"}}