Hello. This is my mysql-server.pp file, both master and client are runing ubuntu. -------------------- class mysql-server { package { "mysql-server": ensure => installed } package { "mysql-client": ensure => installed } service { "mysql": enable => true, ensure => running, require => Package["mysql-server"], } file { "/etc/mysql/my.cnf": owner => "mysql", group => "mysql", source => "puppet:///modules/mysql-server/my.cnf", notify => Service["mysql"], require => Package["mysql-server"], } exec { "set-mysql-password": unless => "mysqladmin -uroot -psecret", path => ["/bin", "/usr/bin"], command => "mysqladmin -uroot password secret", require => Service["mysql"], } exec { "set-nagios-password": unless => "mysqladmin -unagiostest -psecret", path => ["/bin", "/usr/bin"], command => "mysqladmin -unagiostest password secret", require => Service["mysql"], } } ----------------------------------- When I run /etc/init.d/mysql start sql doesnt run Code: root@cloneubuntu:/var/log/mysql# date Mon Oct 10 19:32:56 PDT 2011 root@cloneubuntu:/var/log/mysql# /etc/init.d/mysql start Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql start Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start mysql start: Job is already running: mysql root@cloneubuntu:/var/log/mysql# cat /var/log/mysql/error.log root@cloneubuntu:/var/log/mysql# ps ax | grep sql 4797 pts/0 S+ 0:00 grep --color=auto sql root@cloneubuntu:/var/log/mysql# cat /etc/mysql/my.cnf [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] user = mysql socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp skip-external-locking bind-address = 0.0.0.0 key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 myisam-recover = BACKUP query_cache_limit = 1M query_cache_size = 16M log_error = /var/log/mysql/error.log expire_logs_days = 10 max_binlog_size = 100M [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] [isamchk] key_buffer = 16M !includedir /etc/mysql/conf.d/ root@cloneubuntu:/var/log/mysql# However when i run mysqld alone, it works Code: root@cloneubuntu:/var/log/mysql# date Mon Oct 10 19:34:21 PDT 2011 root@cloneubuntu:/var/log/mysql# mysqld & [1] 4815 root@cloneubuntu:/var/log/mysql# cat /var/log/mysql/error.log 111010 19:34:30 [Note] Plugin ''FEDERATED'' is disabled. 111010 19:34:30 InnoDB: Started; log sequence number 0 44233 111010 19:34:30 [Note] Event Scheduler: Loaded 0 events 111010 19:34:30 [Note] mysqld: ready for connections. Version: ''5.1.41-3ubuntu12.10'' socket: ''/var/run/mysqld/mysqld.sock'' port: 3306 (Ubuntu) root@cloneubuntu:/var/log/mysql# ps ax | grep sql 4815 pts/0 Sl 0:00 mysqld 4830 pts/0 S+ 0:00 grep --color=auto sql root@cloneubuntu:/var/log/mysql# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.41-3ubuntu12.10 (Ubuntu) Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the current input statement. mysql> I cannot reinstall mysql, I have a feeling it''s an issue with the init.d script or somethign along those lines. Please help :S -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Scott Smith
2011-Oct-11 03:00 UTC
Re: [Puppet Users] /etc/init.d/mysql =fail mysqld=success
1) not a puppet problem 2) run initdb On Oct 10, 2011 7:47 PM, "John Bower" <olympus.stance@gmail.com> wrote:> Hello. > > This is my mysql-server.pp file, both master and client are runing > ubuntu. > > > -------------------- > > class mysql-server { > > package { "mysql-server": ensure => installed } > package { "mysql-client": ensure => installed } > service { "mysql": > enable => true, > ensure => running, > require => Package["mysql-server"], > } > > file { "/etc/mysql/my.cnf": > owner => "mysql", group => "mysql", > source => "puppet:///modules/mysql-server/my.cnf", > notify => Service["mysql"], > require => Package["mysql-server"], > } > > > exec { "set-mysql-password": > unless => "mysqladmin -uroot -psecret", > path => ["/bin", "/usr/bin"], > command => "mysqladmin -uroot password secret", > require => Service["mysql"], > } > > > exec { "set-nagios-password": > unless => "mysqladmin -unagiostest -psecret", > path => ["/bin", "/usr/bin"], > command => "mysqladmin -unagiostest password secret", > require => Service["mysql"], > } > > > } > ----------------------------------- > > > > > When I run /etc/init.d/mysql start sql doesnt run > > Code: > > root@cloneubuntu:/var/log/mysql# date > Mon Oct 10 19:32:56 PDT 2011 > root@cloneubuntu:/var/log/mysql# /etc/init.d/mysql start > Rather than invoking init scripts through /etc/init.d, use the > service(8) > utility, e.g. service mysql start > > Since the script you are attempting to invoke has been converted to an > Upstart job, you may also use the start(8) utility, e.g. start mysql > start: Job is already running: mysql > root@cloneubuntu:/var/log/mysql# cat /var/log/mysql/error.log > > root@cloneubuntu:/var/log/mysql# ps ax | grep sql > 4797 pts/0 S+ 0:00 grep --color=auto sql > root@cloneubuntu:/var/log/mysql# cat /etc/mysql/my.cnf > [client] > port = 3306 > socket = /var/run/mysqld/mysqld.sock > > > [mysqld_safe] > socket = /var/run/mysqld/mysqld.sock > nice = 0 > > [mysqld] > > > user = mysql > socket = /var/run/mysqld/mysqld.sock > port = 3306 > basedir = /usr > datadir = /var/lib/mysql > tmpdir = /tmp > skip-external-locking > bind-address = 0.0.0.0 > key_buffer = 16M > max_allowed_packet = 16M > thread_stack = 192K > thread_cache_size = 8 > myisam-recover = BACKUP > query_cache_limit = 1M > query_cache_size = 16M > > log_error = /var/log/mysql/error.log > > expire_logs_days = 10 > max_binlog_size = 100M > > > > [mysqldump] > quick > quote-names > max_allowed_packet = 16M > > [mysql] > > [isamchk] > key_buffer = 16M > > !includedir /etc/mysql/conf.d/ > > root@cloneubuntu:/var/log/mysql# > > However when i run mysqld alone, it works > > Code: > > root@cloneubuntu:/var/log/mysql# date > Mon Oct 10 19:34:21 PDT 2011 > root@cloneubuntu:/var/log/mysql# mysqld & > [1] 4815 > root@cloneubuntu:/var/log/mysql# cat /var/log/mysql/error.log > > 111010 19:34:30 [Note] Plugin ''FEDERATED'' is disabled. > 111010 19:34:30 InnoDB: Started; log sequence number 0 44233 > 111010 19:34:30 [Note] Event Scheduler: Loaded 0 events > 111010 19:34:30 [Note] mysqld: ready for connections. > Version: ''5.1.41-3ubuntu12.10'' socket: ''/var/run/mysqld/mysqld.sock'' > port: 3306 (Ubuntu) > root@cloneubuntu:/var/log/mysql# ps ax | grep sql > 4815 pts/0 Sl 0:00 mysqld > 4830 pts/0 S+ 0:00 grep --color=auto sql > root@cloneubuntu:/var/log/mysql# mysql -u root > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 1 > Server version: 5.1.41-3ubuntu12.10 (Ubuntu) > > Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the current input > statement. > > mysql> > > I cannot reinstall mysql, I have a feeling it''s an issue with the > init.d script or somethign along those lines. > > Please help :S > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hendy Irawan
2012-Feb-02 09:39 UTC
[Puppet Users] Re: /etc/init.d/mysql =fail mysqld=success
I''m having the same problem in Ubuntu Oneiric 11.10 64-bit. It seems puppet runs this command: debug: Service[mysql](provider=debian): Executing ''/etc/init.d/mysql status'' which outputs : $ /etc/init.d/mysql status Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql status Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the status(8) utility, e.g. status mysql mysql stop/waiting Using: status => ''/usr/sbin/service mysql status'', still doesn''t solve the problem. I''m still confused.. On Oct 11 2011, 9:47 am, John Bower <olympus.sta...@gmail.com> wrote:> Hello. > > This is my mysql-server.pp file, both master and client are runing > ubuntu. > > -------------------- > > class mysql-server { > > package { "mysql-server": ensure => installed } > package { "mysql-client": ensure => installed } > service { "mysql": > enable => true, > ensure => running, > require => Package["mysql-server"], > } > > file { "/etc/mysql/my.cnf": > owner => "mysql", group => "mysql", > source => "puppet:///modules/mysql-server/my.cnf", > notify => Service["mysql"], > require => Package["mysql-server"], > } > > exec { "set-mysql-password": > unless => "mysqladmin -uroot -psecret", > path => ["/bin", "/usr/bin"], > command => "mysqladmin -uroot password secret", > require => Service["mysql"], > } > > exec { "set-nagios-password": > unless => "mysqladmin -unagiostest -psecret", > path => ["/bin", "/usr/bin"], > command => "mysqladmin -unagiostest password secret", > require => Service["mysql"], > } > > } > > ----------------------------------- > > When I run /etc/init.d/mysql start sql doesnt run > > Code: > > root@cloneubuntu:/var/log/mysql# date > Mon Oct 10 19:32:56 PDT 2011 > root@cloneubuntu:/var/log/mysql# /etc/init.d/mysql start > Rather than invoking init scripts through /etc/init.d, use the > service(8) > utility, e.g. service mysql start > > Since the script you are attempting to invoke has been converted to an > Upstart job, you may also use the start(8) utility, e.g. start mysql > start: Job is already running: mysql > root@cloneubuntu:/var/log/mysql# cat /var/log/mysql/error.log > > root@cloneubuntu:/var/log/mysql# ps ax | grep sql > 4797 pts/0 S+ 0:00 grep --color=auto sql > root@cloneubuntu:/var/log/mysql# cat /etc/mysql/my.cnf > [client] > port = 3306 > socket = /var/run/mysqld/mysqld.sock > > [mysqld_safe] > socket = /var/run/mysqld/mysqld.sock > nice = 0 > > [mysqld] > > user = mysql > socket = /var/run/mysqld/mysqld.sock > port = 3306 > basedir = /usr > datadir = /var/lib/mysql > tmpdir = /tmp > skip-external-locking > bind-address = 0.0.0.0 > key_buffer = 16M > max_allowed_packet = 16M > thread_stack = 192K > thread_cache_size = 8 > myisam-recover = BACKUP > query_cache_limit = 1M > query_cache_size = 16M > > log_error = /var/log/mysql/error.log > > expire_logs_days = 10 > max_binlog_size = 100M > > [mysqldump] > quick > quote-names > max_allowed_packet = 16M > > [mysql] > > [isamchk] > key_buffer = 16M > > !includedir /etc/mysql/conf.d/ > > root@cloneubuntu:/var/log/mysql# > > However when i run mysqld alone, it works > > Code: > > root@cloneubuntu:/var/log/mysql# date > Mon Oct 10 19:34:21 PDT 2011 > root@cloneubuntu:/var/log/mysql# mysqld & > [1] 4815 > root@cloneubuntu:/var/log/mysql# cat /var/log/mysql/error.log > > 111010 19:34:30 [Note] Plugin ''FEDERATED'' is disabled. > 111010 19:34:30 InnoDB: Started; log sequence number 0 44233 > 111010 19:34:30 [Note] Event Scheduler: Loaded 0 events > 111010 19:34:30 [Note] mysqld: ready for connections. > Version: ''5.1.41-3ubuntu12.10'' socket: ''/var/run/mysqld/mysqld.sock'' > port: 3306 (Ubuntu) > root@cloneubuntu:/var/log/mysql# ps ax | grep sql > 4815 pts/0 Sl 0:00 mysqld > 4830 pts/0 S+ 0:00 grep --color=auto sql > root@cloneubuntu:/var/log/mysql# mysql -u root > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 1 > Server version: 5.1.41-3ubuntu12.10 (Ubuntu) > > Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the current input > statement. > > mysql> > > I cannot reinstall mysql, I have a feeling it''s an issue with the > init.d script or somethign along those lines. > > Please help :S-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nan Liu
2012-Feb-02 20:08 UTC
Re: [Puppet Users] Re: /etc/init.d/mysql =fail mysqld=success
On Thu, Feb 2, 2012 at 4:39 AM, Hendy Irawan <ceefour666@gmail.com> wrote:> I''m having the same problem in Ubuntu Oneiric 11.10 64-bit. > > It seems puppet runs this command: > > debug: Service[mysql](provider=debian): Executing ''/etc/init.d/mysql > status'' > > which outputs : > > $ /etc/init.d/mysql status > Rather than invoking init scripts through /etc/init.d, use the > service(8) > utility, e.g. service mysql status > > Since the script you are attempting to invoke has been converted to an > Upstart job, you may also use the status(8) utility, e.g. status mysql > mysql stop/waiting > > Using: > > status => ''/usr/sbin/service mysql status'', > > still doesn''t solve the problem. > > I''m still confused..Is the service command returning appropriate exit code? Depending on your puppet version, try adding: service { ''mysql'': ... provider => ''upstart'', } Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.