{"action":"created","issue":{"url":"https://api.github.com/repos/opscode-cookbooks/mysql/issues/273","labels_url":"https://api.github.com/repos/opscode-cookbooks/mysql/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/opscode-cookbooks/mysql/issues/273/comments","events_url":"https://api.github.com/repos/opscode-cookbooks/mysql/issues/273/events","html_url":"https://github.com/opscode-cookbooks/mysql/issues/273","id":52761980,"number":273,"title":"Default Recipe Script failed on Centos 6.6","user":{"login":"ZhijieWang","id":1463296,"avatar_url":"https://avatars.githubusercontent.com/u/1463296?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhijieWang","html_url":"https://github.com/ZhijieWang","followers_url":"https://api.github.com/users/ZhijieWang/followers","following_url":"https://api.github.com/users/ZhijieWang/following{/other_user}","gists_url":"https://api.github.com/users/ZhijieWang/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhijieWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhijieWang/subscriptions","organizations_url":"https://api.github.com/users/ZhijieWang/orgs","repos_url":"https://api.github.com/users/ZhijieWang/repos","events_url":"https://api.github.com/users/ZhijieWang/events{/privacy}","received_events_url":"https://api.github.com/users/ZhijieWang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-23T18:08:49Z","updated_at":"2015-01-06T00:12:41Z","closed_at":"2015-01-06T00:12:41Z","body":"I have I am using cookbook 6.0.4 with Chef 12.0.3 on Chef Vragrant Centos 6.6 box. Virtual box version 4.3.\r\nI run into the following problem using the example script from the README of this cookbook.\r\n\r\nChef will fail to execute command  ``/sbin/service mysql-default start``. \r\nAfter vagrant ssh into the box, I can start 'sudo service mysql-default' with root user.\r\n\r\nAnd I wonder if this is the cause, it has 'debian' but I am on centos:\r\n    ==> default:  27:           service \"#{new_resource.name} :start #{mysql_name}\" do\r\n    ==> default:  28:             service_name mysql_name\r\n    ==> default:  29:             provider Chef::Provider::Service::Init::Insserv if node['platform'] == 'debian'\r\n    ==> default:  30:             supports restart: true, status: true\r\n    ==> default:  31:             action [:enable, :start]\r\n    ==> default:  32:           end\r\n    ==> default:  33:         end\r\n    ==> default:\r\n\r\n\r\n    PS C:\\Users\\bill\\VMs\\cheftest\\myapp> vagrant provision\r\n    ==> default: Loading Berkshelf datafile...\r\n    ==> default: Sharing cookbooks with VM\r\n    ==> default: Updating Vagrant's Berkshelf...\r\n    ==> default: Resolving cookbook dependencies...\r\n    ==> default: Fetching 'myapp' from source at .\r\n    ==> default: Fetching cookbook index from https://supermarket.getchef.com...\r\n    ==> default: Using apt (2.6.0)\r\n    ==> default: Using apache2 (3.0.0)\r\n    ==> default: Using hhvm (0.6.0)\r\n    ==> default: Using iptables (0.14.0)\r\n    ==> default: Using java (1.29.0)\r\n    ==> default: Using logrotate (1.7.0)\r\n    ==> default: Using myapp (0.1.0) from source at .\r\n    ==> default: Using mysql (6.0.4)\r\n    ==> default: Using rbac (1.0.2)\r\n    ==> default: Using resource-control (0.1.1)\r\n    ==> default: Using smf (2.2.1)\r\n    ==> default: Using yum (3.5.1)\r\n    ==> default: Using yum-mysql-community (0.1.11)\r\n    ==> default: Vendoring apache2 (3.0.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz\r\n    8af-default/apache2\r\n    ==> default: Vendoring apt (2.6.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af-\r\n    default/apt\r\n    ==> default: Vendoring hhvm (0.6.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af\r\n    -default/hhvm\r\n    ==> default: Vendoring iptables (0.14.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1b\r\n    dz8af-default/iptables\r\n    ==> default: Vendoring java (1.29.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8a\r\n    f-default/java\r\n    ==> default: Vendoring logrotate (1.7.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1b\r\n    dz8af-default/logrotate\r\n    ==> default: Vendoring myapp (0.1.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8a\r\n    f-default/myapp\r\n    ==> default: Vendoring mysql (6.0.4) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8a\r\n    f-default/mysql\r\n    ==> default: Vendoring rbac (1.0.2) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af\r\n    -default/rbac\r\n    ==> default: Vendoring resource-control (0.1.1) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-\r\n    5244-1bdz8af-default/resource-control\r\n    ==> default: Vendoring smf (2.2.1) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af-\r\n    default/smf\r\n    ==> default: Vendoring yum (3.5.1) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af-\r\n    default/yum\r\n    ==> default: Vendoring yum-mysql-community (0.1.11) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141\r\n    223-5244-1bdz8af-default/yum-mysql-community\r\n    ==> default: Chef 12.0.3 Omnibus package is already installed.\r\n    ==> default: Running provisioner: chef_solo...\r\n    ==> default: Detected Chef (latest) is already installed\r\n    Generating chef JSON and uploading...\r\n    ==> default: Running chef-solo...\r\n    ==> default: [2014-12-23T17:06:34+00:00] INFO: Forking chef instance to converge...\r\n    ==> default: [2014-12-23T17:06:34+00:00] INFO: *** Chef 12.0.3 ***\r\n    ==> default: [2014-12-23T17:06:34+00:00] INFO: Chef-client pid: 4105\r\n    ==> default: [2014-12-23T17:06:37+00:00] INFO: Setting the run_list to [\"recipe[myapp::default]\"] from CLI options\r\n    ==> default: [2014-12-23T17:06:37+00:00] INFO: Run List is [recipe[myapp::default]]\r\n    ==> default: [2014-12-23T17:06:37+00:00] INFO: Run List expands to [myapp::default]\r\n    ==> default: [2014-12-23T17:06:37+00:00] INFO: Starting Chef Run for myapp-berkshelf\r\n    ==> default: [2014-12-23T17:06:37+00:00] INFO: Running start handlers\r\n    ==> default: [2014-12-23T17:06:37+00:00] INFO: Start handlers complete.\r\n    ==> default: [2014-12-23T17:06:39+00:00] INFO: Ignoring apache2::mod_authn_core. not available until apache 2.4\r\n    ==> default: [2014-12-23T17:06:39+00:00] WARN: Cloning resource attributes for execute[a2dissite default.conf] from prio\r\n    r resource (CHEF-3694)\r\n    ==> default: [2014-12-23T17:06:39+00:00] WARN: Previous execute[a2dissite default.conf]: /tmp/vagrant-chef-3/chef-solo-1\r\n    /cookbooks/apache2/definitions/apache_site.rb:35:in `block in from_file'\r\n    ==> default: [2014-12-23T17:06:39+00:00] WARN: Current  execute[a2dissite default.conf]: /tmp/vagrant-chef-3/chef-solo-1\r\n    /cookbooks/apache2/definitions/apache_site.rb:35:in `block in from_file'\r\n    ==> default: [2014-12-23T17:06:44+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] created file /etc/yum.r\r\n    epos.d/mysql57-community.repo\r\n    ==> default: [2014-12-23T17:06:44+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] updated file contents /\r\n    etc/yum.repos.d/mysql57-community.repo\r\n    ==> default: [2014-12-23T17:06:44+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] mode changed to 644\r\n    ==> default: [2014-12-23T17:06:45+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] sending run action to e\r\n    xecute[yum-makecache-mysql57-community] (immediate)\r\n    ==> default: [2014-12-23T17:06:47+00:00] INFO: execute[yum-makecache-mysql57-community] ran successfully\r\n    ==> default: [2014-12-23T17:06:47+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] sending create action t\r\n    o ruby_block[yum-cache-reload-mysql57-community] (immediate)\r\n    ==> default: [2014-12-23T17:06:47+00:00] INFO: ruby_block[yum-cache-reload-mysql57-community] called\r\n    ==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default] owner changed to 27\r\n    ==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default] group changed to 27\r\n    ==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default/conf.d] owner changed to 27\r\n    ==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default/conf.d] group changed to 27\r\n    ==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /var/run/mysql-default] owner changed to 27\r\n    ==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /var/run/mysql-default] group changed to 27\r\n    ==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/log/mysql-default] owner changed to 27\r\n    ==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/log/mysql-default] group changed to 27\r\n    ==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/lib/mysql-default] owner changed to 27\r\n    ==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/lib/mysql-default] group changed to 27\r\n    ==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] backed up to /var/che\r\n    f/backup/etc/mysql-default/my.cnf.chef-20141223170653.091418\r\n    ==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] updated file contents\r\n     /etc/mysql-default/my.cnf\r\n    ==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] owner changed to 27\r\n    ==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] group changed to 27\r\n    ==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :start /etc/init.d/mysql-default] backed up to /var/chef\r\n    /backup/etc/init.d/mysql-default.chef-20141223170653.511102\r\n    ==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :start /etc/init.d/mysql-default] updated file contents\r\n    /etc/init.d/mysql-default\r\n    ==> default: ================================================================================\r\n    ==> default: Error executing action `start` on resource 'service[default :start mysql-default]'\r\n    ==> default: ================================================================================\r\n    ==> default: Mixlib::ShellOut::ShellCommandFailed\r\n    ==> default:\r\n    ==> default: ------------------------------------\r\n    ==> default: Expected process to exit with [0], but received '1'\r\n    ==> default: ---- Begin output of /sbin/service mysql-default start ----\r\n    ==> default: STDOUT: Starting MySQL instance mysql-default\r\n    ==> default: Starting mysql-default:  [  OK  ]\r\n    ==> default: STDERR:\r\n    ==> default: ---- End output of /sbin/service mysql-default start ----\r\n    ==> default: Ran /sbin/service mysql-default start returned 1\r\n    ==> default:\r\n    ==> default: Resource Declaration:\r\n    ==> default: ---------------------\r\n    ==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_sysvinit.rb\r\n    ==> default:\r\n    ==> default:  27:           service \"#{new_resource.name} :start #{mysql_name}\" do\r\n    ==> default:  28:             service_name mysql_name\r\n    ==> default:  29:             provider Chef::Provider::Service::Init::Insserv if node['platform'] == 'debian'\r\n    ==> default:  30:             supports restart: true, status: true\r\n    ==> default:  31:             action [:enable, :start]\r\n    ==> default:  32:           end\r\n    ==> default:  33:         end\r\n    ==> default:\r\n    ==> default: Compiled Resource:\r\n    ==> default: ------------------\r\n    ==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_sysvinit.rb:\r\n    27:in `block in <class:Sysvinit>'\r\n    ==> default:\r\n    ==> default: service(\"default :start mysql-default\") do\r\n    ==> default:   action [:enable, :start]\r\n    ==> default:   supports {:restart=>true, :status=>true}\r\n    ==> default:   retries 0\r\n    ==> default:   retry_delay 2\r\n    ==> default:   default_guard_interpreter :default\r\n    ==> default:   service_name \"mysql-default\"\r\n    ==> default:   enabled true\r\n    ==> default:   pattern \"default :start mysql-default\"\r\n    ==> default:   declared_type :service\r\n    ==> default:   cookbook_name :myapp\r\n    ==> default: end\r\n    ==> default:\r\n    ==> default: [2014-12-23T17:07:24+00:00] INFO: Running queued delayed notifications before re-raising exception\r\n    ==> default: ================================================================================\r\n    ==> default: Error executing action `start` on resource 'mysql_service[default]'\r\n    ==> default: ================================================================================\r\n    ==> default:\r\n    ==> default: Mixlib::ShellOut::ShellCommandFailed\r\n    ==> default: ------------------------------------\r\n    ==> default: service[default :start mysql-default] (/tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_m\r\n    ysql_service_sysvinit.rb line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0],\r\n     but received '1'\r\n    ==> default: ---- Begin output of /sbin/service mysql-default start ----\r\n    ==> default: STDOUT: Starting MySQL instance mysql-default\r\n    ==> default: Starting mysql-default:  [  OK  ]\r\n    ==> default: STDERR:\r\n    ==> default: ---- End output of /sbin/service mysql-default start ----\r\n    ==> default: Ran /sbin/service mysql-default start returned 1\r\n    ==> default:\r\n    ==> default: Resource Declaration:\r\n    ==> default: ---------------------\r\n    ==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/myapp/recipes/database.rb\r\n    ==> default:\r\n    ==> default:   1: mysql_service 'default' do\r\n    ==> default:   2:   port '3306'\r\n    ==> default:   3:   version '5.7'\r\n    ==> default:   4:   initial_root_password 'change me'\r\n    ==> default:   5:   action [:create, :start]\r\n    ==> default:   6: end\r\n    ==> default:   7:\r\n    ==> default:\r\n    ==> default: Compiled Resource:\r\n    ==> default: ------------------\r\n    ==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/myapp/recipes/database.rb:1:in `from_file'\r\n    ==> default:\r\n    ==> default: mysql_service(\"default\") do\r\n    ==> default:   action [:create, :start]\r\n    ==> default:   updated true\r\n    ==> default:   updated_by_last_action true\r\n    ==> default:   retries 0\r\n    ==> default:   retry_delay 2\r\n    ==> default:   default_guard_interpreter :default\r\n    ==> default:   declared_type :mysql_service\r\n    ==> default:   cookbook_name :myapp\r\n    ==> default:   recipe_name \"database\"\r\n    ==> default:   port \"3306\"\r\n    ==> default:   version \"5.7\"\r\n    ==> default:   initial_root_password \"change me\"\r\n    ==> default:   package_action :install\r\n    ==> default:   instance \"default\"\r\n    ==> default:   run_user \"mysql\"\r\n    ==> default:   run_group \"mysql\"\r\n    ==> default:   charset \"utf8\"\r\n    ==> default: end\r\n    ==> default: [2014-12-23T17:07:24+00:00] INFO: Running queued delayed notifications before re-raising exception\r\n    ==> default: [2014-12-23T17:07:24+00:00] ERROR: Running exception handlers\r\n    ==> default: [2014-12-23T17:07:24+00:00] ERROR: Exception handlers complete\r\n    ==> default: [2014-12-23T17:07:24+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out\r\n    ==> default: [2014-12-23T17:07:25+00:00] ERROR: mysql_service[default] (myapp::database line 1) had an error: Mixlib::Sh\r\n    ellOut::ShellCommandFailed: service[default :start mysql-default] (/tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libra\r\n    ries/provider_mysql_service_sysvinit.rb line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to\r\n     exit with [0], but received '1'\r\n    ==> default: ---- Begin output of /sbin/service mysql-default start ----\r\n    ==> default: STDOUT: Starting MySQL instance mysql-default\r\n    ==> default: Starting mysql-default:  [  OK  ]\r\n    ==> default: STDERR:\r\n    ==> default: ---- End output of /sbin/service mysql-default start ----\r\n    ==> default: Ran /sbin/service mysql-default start returned 1\r\n    ==> default: [2014-12-23T17:07:25+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessf\r\n    ully (exit code 1)\r\n    Chef never successfully completed! Any errors should be visible in the\r\n    output above. Please fix your recipes so that they properly complete.\r\n    PS C:\\Users\\bill\\VMs\\cheftest\\myapp> vagrant ssh\r\n    Last login: Tue Dec 23 16:53:23 2014 from 10.0.2.2\r\n    [vagrant@myapp-berkshelf ~]$ sudo service mysql-default status\r\n    mysql-default is not running\r\n    [vagrant@myapp-berkshelf ~]$ sudo service mysql-default start\r\n    Starting MySQL instance mysql-default\r\n\r\n    Starting mysql-default:                                    [  OK  ]\r\n    [vagrant@myapp-berkshelf ~]$\r\n    [vagrant@myapp-berkshelf ~]$"},"comment":{"url":"https://api.github.com/repos/opscode-cookbooks/mysql/issues/comments/68805941","html_url":"https://github.com/opscode-cookbooks/mysql/issues/273#issuecomment-68805941","issue_url":"https://api.github.com/repos/opscode-cookbooks/mysql/issues/273","id":68805941,"user":{"login":"someara","id":69068,"avatar_url":"https://avatars.githubusercontent.com/u/69068?v=3","gravatar_id":"","url":"https://api.github.com/users/someara","html_url":"https://github.com/someara","followers_url":"https://api.github.com/users/someara/followers","following_url":"https://api.github.com/users/someara/following{/other_user}","gists_url":"https://api.github.com/users/someara/gists{/gist_id}","starred_url":"https://api.github.com/users/someara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/someara/subscriptions","organizations_url":"https://api.github.com/users/someara/orgs","repos_url":"https://api.github.com/users/someara/repos","events_url":"https://api.github.com/users/someara/events{/privacy}","received_events_url":"https://api.github.com/users/someara/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T00:12:41Z","updated_at":"2015-01-06T00:12:41Z","body":"Tracked this one down....\r\nselinux needs to be enabled, and you need to have enough ram for Chef to run and initialize while initializing the database.\r\n\r\nThe changes reflected in this commit made the tests pass on my laptop w/ Vagrant.\r\nhttps://github.com/opscode-cookbooks/mysql/commit/78464181496144999c2a37361cfae06ffe722e07"}}