Hi, I am new to puppet and have started evaluating various features in last few days. I am not a developer and am mostly going to use the modules available on github or puppet forge. Currently I have tried all easier modules and they seem to work perfectly without any issues, but now the problem is arising when I am trying to use modules like mysql, tomcat etc... For mysql I am using the module https://github.com/puppetlabs/puppetlabs-mysql What I am observing is mysql is gets installed and everything but no db is added, also intermittently the password is not set, it is neither not blank nor does it set the password that I have mentioned. The nodes.pp that I am using is as follows [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp class baseclass { class { ''mysql'': } class { ''mysql::server'': #config_hash => { ''root_password'' => ''mypass'' } } mysql::db { ''mydb'': user => ''myuser'', password => ''mypass'', host => ''localhost'', grant => [''all''], } } node ''pclient1.example.com'' { include baseclass } Now as in nodes.pp if I try to set the password it gives me the error below on the puppet client node [root@pclient1 ~]# puppetd --test notice: Ignoring --listen on onetime run info: Caching catalog for pclient1.example.com info: Applying configuration version ''1343801984'' notice: /Stage[main]/Mysql::Config/ Exec[set_mysql_rootpw]/returns: mysqladmin: connect to server at ''localhost'' failed notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: error: ''Access denied for user ''root''@''localhost'' (using password: NO)'' err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change from notrun to 0 failed: mysqladmin -u root password mypass returned 1 instead of one of [0] at /etc/puppet/modules/mysql/manifests/config.pp:94 notice: /File[/root/.my.cnf]: Dependency Exec[set_mysql_rootpw] has failures: true warning: /File[/root/.my.cnf]: Skipping because of failed dependencies notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Dependency Exec[set_mysql_rootpw] has failures: true warning: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Skipping because of failed dependencies notice: Finished catalog run in 0.56 seconds And in case I do not specify the password in the nodes.pp, not sure what password is sets but only adds the mysql service to the client node. I am sure I am missing something and here but not sure what... Also in case of tomcat I am having similar issues not sure how can I add applications or tomcat in the /usr/local/tomcat path. Thanks for your help in advance. Rakesh K. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/cmCymGkqgf4J. 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.
Can Someone please help me out with this ??? On Wednesday, August 1, 2012 12:23:22 PM UTC+5:30, Rakesh K wrote:> > Hi, > > I am new to puppet and have started evaluating various features in last > few days. I am not a developer and am mostly going to use the modules > available on github or puppet forge. > > Currently I have tried all easier modules and they seem to work perfectly > without any issues, but now the problem is arising when I am trying to use > modules like mysql, tomcat etc... > > For mysql I am using the module > https://github.com/puppetlabs/puppetlabs-mysql > > What I am observing is mysql is gets installed and everything but no db is > added, also intermittently the password is not set, it is neither not blank > nor does it set the password that I have mentioned. The nodes.pp that I am > using is as follows > > [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp > class baseclass { > class { ''mysql'': } > class { ''mysql::server'': > #config_hash => { ''root_password'' => ''mypass'' } > } > mysql::db { ''mydb'': > user => ''myuser'', > password => ''mypass'', > host => ''localhost'', > grant => [''all''], > } > } > > node ''pclient1.example.com'' { > include baseclass > } > > Now as in nodes.pp if I try to set the password it gives me the error > below on the puppet client node > > [root@pclient1 ~]# puppetd --test > notice: Ignoring --listen on onetime run > info: Caching catalog for pclient1.example.com > info: Applying configuration version ''1343801984'' > notice: /Stage[main]/Mysql::Config/ > Exec[set_mysql_rootpw]/returns: mysqladmin: connect to server at > ''localhost'' failed > notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: error: > ''Access denied for user ''root''@''localhost'' (using password: NO)'' > err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change > from notrun to 0 failed: mysqladmin -u root password mypass returned 1 > instead of one of [0] at /etc/puppet/modules/mysql/manifests/config.pp:94 > notice: /File[/root/.my.cnf]: Dependency Exec[set_mysql_rootpw] has > failures: true > warning: /File[/root/.my.cnf]: Skipping because of failed dependencies > notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Dependency > Exec[set_mysql_rootpw] has failures: true > warning: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Skipping because > of failed dependencies > notice: Finished catalog run in 0.56 seconds > > > And in case I do not specify the password in the nodes.pp, not sure what > password is sets but only adds the mysql service to the client node. > > I am sure I am missing something and here but not sure what... > > Also in case of tomcat I am having similar issues not sure how can I add > applications or tomcat in the /usr/local/tomcat path. > > Thanks for your help in advance. > > Rakesh K. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/uysf_bslZCwJ. 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.
Ryan Coleman
2012-Aug-02 18:08 UTC
Re: [Puppet Users] Issues with installing some modules !!!
Hi Rakesh, I''ll take a look at this and see if I can reproduce what you''re experiencing. Sorry for the delay in getting help out to you. Could you answer a couple questions to help me replicate? What operating system and version are you using? What version of Puppet are you using? What version of the puppetlabs-mysql module are you using? Did you clone from master on GitHub or are you using the latest released code from the Puppet Forge? -> http://forge.puppetlabs.com/puppetlabs/mysql --Ryan On Tue, Jul 31, 2012 at 11:53 PM, Rakesh K <rkathpal@gmail.com> wrote:> Hi, > > I am new to puppet and have started evaluating various features in last few > days. I am not a developer and am mostly going to use the modules available > on github or puppet forge. > > Currently I have tried all easier modules and they seem to work perfectly > without any issues, but now the problem is arising when I am trying to use > modules like mysql, tomcat etc... > > For mysql I am using the module > https://github.com/puppetlabs/puppetlabs-mysql > > What I am observing is mysql is gets installed and everything but no db is > added, also intermittently the password is not set, it is neither not blank > nor does it set the password that I have mentioned. The nodes.pp that I am > using is as follows > > [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp > class baseclass { > class { ''mysql'': } > class { ''mysql::server'': > #config_hash => { ''root_password'' => ''mypass'' } > } > mysql::db { ''mydb'': > user => ''myuser'', > password => ''mypass'', > host => ''localhost'', > grant => [''all''], > } > } > > node ''pclient1.example.com'' { > include baseclass > } > > Now as in nodes.pp if I try to set the password it gives me the error below > on the puppet client node > > [root@pclient1 ~]# puppetd --test > notice: Ignoring --listen on onetime run > info: Caching catalog for pclient1.example.com > info: Applying configuration version ''1343801984'' > notice: /Stage[main]/Mysql::Config/ > Exec[set_mysql_rootpw]/returns: mysqladmin: connect to server at ''localhost'' > failed > notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: error: > ''Access denied for user ''root''@''localhost'' (using password: NO)'' > err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change from > notrun to 0 failed: mysqladmin -u root password mypass returned 1 instead > of one of [0] at /etc/puppet/modules/mysql/manifests/config.pp:94 > notice: /File[/root/.my.cnf]: Dependency Exec[set_mysql_rootpw] has > failures: true > warning: /File[/root/.my.cnf]: Skipping because of failed dependencies > notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Dependency > Exec[set_mysql_rootpw] has failures: true > warning: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Skipping because > of failed dependencies > notice: Finished catalog run in 0.56 seconds > > > And in case I do not specify the password in the nodes.pp, not sure what > password is sets but only adds the mysql service to the client node. > > I am sure I am missing something and here but not sure what... > > Also in case of tomcat I am having similar issues not sure how can I add > applications or tomcat in the /usr/local/tomcat path. > > Thanks for your help in advance. > > Rakesh K. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/cmCymGkqgf4J. > 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.-- Ryan Coleman | about.me/ryc Modules & Forge @ Puppet Labs -- 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.
Ryan Coleman
2012-Aug-02 18:19 UTC
Re: [Puppet Users] Issues with installing some modules !!!
On Tue, Jul 31, 2012 at 11:53 PM, Rakesh K <rkathpal@gmail.com> wrote:> For mysql I am using the module > https://github.com/puppetlabs/puppetlabs-mysql > > What I am observing is mysql is gets installed and everything but no db is > added, also intermittently the password is not set, it is neither not blank > nor does it set the password that I have mentioned. The nodes.pp that I am > using is as follows > > [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp > class baseclass { > class { ''mysql'': } > class { ''mysql::server'': > #config_hash => { ''root_password'' => ''mypass'' } > } > mysql::db { ''mydb'': > user => ''myuser'', > password => ''mypass'', > host => ''localhost'', > grant => [''all''], > } > }I just noticed that you have commented out the config_hash parameter. Have you tried uncommenting that and setting ''mypass'' to the actual value of your database servers root password? Puppet uses this information to configure the file /root/.my.cnf which is leveraged when the various mysql commands are run to provision the database, create database users and assign grants. -- 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.
On Thu, Aug 2, 2012 at 11:19 AM, Ryan Coleman <ryan@puppetlabs.com> wrote:> On Tue, Jul 31, 2012 at 11:53 PM, Rakesh K <rkathpal@gmail.com> wrote: >> For mysql I am using the module >> https://github.com/puppetlabs/puppetlabs-mysql >> >> What I am observing is mysql is gets installed and everything but no db is >> added, also intermittently the password is not set, it is neither not blank >> nor does it set the password that I have mentioned. The nodes.pp that I am >> using is as follows >> >> [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp >> class baseclass { >> class { ''mysql'': } >> class { ''mysql::server'': >> #config_hash => { ''root_password'' => ''mypass'' } >> } >> mysql::db { ''mydb'': >> user => ''myuser'', >> password => ''mypass'', >> host => ''localhost'', >> grant => [''all''], >> } >> } > > I just noticed that you have commented out the config_hash parameter. > Have you tried uncommenting that and setting ''mypass'' to the actual > value of your database servers root password? > > Puppet uses this information to configure the file /root/.my.cnf which > is leveraged when the various mysql commands are run to provision the > database, create database users and assign grants.Yeah, per Ryan, most likely you already have an existing password, and you need to set old_root_password before you can set the new password: ... config_hash => { root_password => ''mypass'', old_root_password => ''oldpass'', } ... 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.
Rakesh Kathpal
2012-Aug-03 07:36 UTC
Re: [Puppet Users] Issues with installing some modules !!!
Hi, Following are the requested details OS - Centos 5.4 Puppet Server - 2.7.12 Pupper Client - puppet-2.6.16 puppet-mysql module version - 0.4.0<https://github.com/puppetlabs/puppetlabs-mysql/commit/583e60fe843082e5c551ee93ab2ce45b47733216> Git Cloned from : https://github.com/puppetlabs/puppetlabs-mysql.git Yes.. I first used the "config_hash => { ''root_password'' => ''mypass'' }" parameter but later when it wasn''t working, I commented it. I also enabled pluginsync in my puppet.conf. Still no avail. I really appreciate the help from you guys. Thanks & Regards, Rakesh K. On Thu, Aug 2, 2012 at 11:58 PM, Nan Liu <nan@puppetlabs.com> wrote:> On Thu, Aug 2, 2012 at 11:19 AM, Ryan Coleman <ryan@puppetlabs.com> wrote: > > On Tue, Jul 31, 2012 at 11:53 PM, Rakesh K <rkathpal@gmail.com> wrote: > >> For mysql I am using the module > >> https://github.com/puppetlabs/puppetlabs-mysql > >> > >> What I am observing is mysql is gets installed and everything but no db > is > >> added, also intermittently the password is not set, it is neither not > blank > >> nor does it set the password that I have mentioned. The nodes.pp that I > am > >> using is as follows > >> > >> [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp > >> class baseclass { > >> class { ''mysql'': } > >> class { ''mysql::server'': > >> #config_hash => { ''root_password'' => ''mypass'' } > >> } > >> mysql::db { ''mydb'': > >> user => ''myuser'', > >> password => ''mypass'', > >> host => ''localhost'', > >> grant => [''all''], > >> } > >> } > > > > I just noticed that you have commented out the config_hash parameter. > > Have you tried uncommenting that and setting ''mypass'' to the actual > > value of your database servers root password? > > > > Puppet uses this information to configure the file /root/.my.cnf which > > is leveraged when the various mysql commands are run to provision the > > database, create database users and assign grants. > > Yeah, per Ryan, most likely you already have an existing password, and > you need to set old_root_password before you can set the new password: > > ... > config_hash => { > root_password => ''mypass'', > old_root_password => ''oldpass'', > } > ... > > 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. > >-- 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.
Any updates ?? On Wednesday, August 1, 2012 12:23:22 PM UTC+5:30, Rakesh K wrote:> > Hi, > > I am new to puppet and have started evaluating various features in last > few days. I am not a developer and am mostly going to use the modules > available on github or puppet forge. > > Currently I have tried all easier modules and they seem to work perfectly > without any issues, but now the problem is arising when I am trying to use > modules like mysql, tomcat etc... > > For mysql I am using the module > https://github.com/puppetlabs/puppetlabs-mysql > > What I am observing is mysql is gets installed and everything but no db is > added, also intermittently the password is not set, it is neither not blank > nor does it set the password that I have mentioned. The nodes.pp that I am > using is as follows > > [root@pmast1 manifests]# cat /etc/puppet/manifests/nodes.pp > class baseclass { > class { ''mysql'': } > class { ''mysql::server'': > #config_hash => { ''root_password'' => ''mypass'' } > } > mysql::db { ''mydb'': > user => ''myuser'', > password => ''mypass'', > host => ''localhost'', > grant => [''all''], > } > } > > node ''pclient1.example.com'' { > include baseclass > } > > Now as in nodes.pp if I try to set the password it gives me the error > below on the puppet client node > > [root@pclient1 ~]# puppetd --test > notice: Ignoring --listen on onetime run > info: Caching catalog for pclient1.example.com > info: Applying configuration version ''1343801984'' > notice: /Stage[main]/Mysql::Config/ > Exec[set_mysql_rootpw]/returns: mysqladmin: connect to server at > ''localhost'' failed > notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: error: > ''Access denied for user ''root''@''localhost'' (using password: NO)'' > err: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: change > from notrun to 0 failed: mysqladmin -u root password mypass returned 1 > instead of one of [0] at /etc/puppet/modules/mysql/manifests/config.pp:94 > notice: /File[/root/.my.cnf]: Dependency Exec[set_mysql_rootpw] has > failures: true > warning: /File[/root/.my.cnf]: Skipping because of failed dependencies > notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Dependency > Exec[set_mysql_rootpw] has failures: true > warning: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Skipping because > of failed dependencies > notice: Finished catalog run in 0.56 seconds > > > And in case I do not specify the password in the nodes.pp, not sure what > password is sets but only adds the mysql service to the client node. > > I am sure I am missing something and here but not sure what... > > Also in case of tomcat I am having similar issues not sure how can I add > applications or tomcat in the /usr/local/tomcat path. > > Thanks for your help in advance. > > Rakesh K. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/kPdVuKK1b0EJ. 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.
Ryan Coleman
2012-Aug-07 20:51 UTC
Re: [Puppet Users] Re: Issues with installing some modules !!!
On Mon, Aug 6, 2012 at 2:05 AM, Rakesh K <rkathpal@gmail.com> wrote:> Any updates ??Sorry Rakesh, I was waiting for your response to Nan''s comments. I''ve pasted them below for reference.>>>Yeah, per Ryan, most likely you already have an existing password, and you need to set old_root_password before you can set the new password: ... config_hash => { root_password => ''mypass'', old_root_password => ''oldpass'', } -- 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.
Rakesh K
2012-Aug-08 05:44 UTC
Re: [Puppet Users] Re: Issues with installing some modules !!!
Actually I have tried fresh install of the module multiple times after clearing all traces of the mysql package on the client but still getting the same result. I am using the same nodes.pp as above.... as the password is not set at all, I hv not tried using the old_password parameter at all. Please suggest. On Wednesday, August 8, 2012 2:21:43 AM UTC+5:30, Ryan Coleman wrote:> > On Mon, Aug 6, 2012 at 2:05 AM, Rakesh K <rkat...@gmail.com <javascript:>> > wrote: > > Any updates ?? > > Sorry Rakesh, I was waiting for your response to Nan''s comments. I''ve > pasted them below for reference. > > >>> > > Yeah, per Ryan, most likely you already have an existing password, and > you need to set old_root_password before you can set the new password: > > ... > config_hash => { > root_password => ''mypass'', > old_root_password => ''oldpass'', > } >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/SG8Y3H6hQjgJ. 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.
Rakesh K
2012-Aug-08 05:48 UTC
Re: [Puppet Users] Re: Issues with installing some modules !!!
Also can you please guide me as to how can I try this from the dashboard ? I know I can simply include the mysql class and assign it to my node.. but how can I actually pass these parameters and how will dashboard know which parameters refers to which class? On Wednesday, August 8, 2012 11:14:58 AM UTC+5:30, Rakesh K wrote:> > > Actually I have tried fresh install of the module multiple times after > clearing all traces of the mysql package on the client but still getting > the same result. > > I am using the same nodes.pp as above.... as the password is not set at > all, I hv not tried using the old_password parameter at all. > > Please suggest. > > > On Wednesday, August 8, 2012 2:21:43 AM UTC+5:30, Ryan Coleman wrote: >> >> On Mon, Aug 6, 2012 at 2:05 AM, Rakesh K <rkat...@gmail.com> wrote: >> > Any updates ?? >> >> Sorry Rakesh, I was waiting for your response to Nan''s comments. I''ve >> pasted them below for reference. >> >> >>> >> >> Yeah, per Ryan, most likely you already have an existing password, and >> you need to set old_root_password before you can set the new password: >> >> ... >> config_hash => { >> root_password => ''mypass'', >> old_root_password => ''oldpass'', >> } >> >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/1XPnGzLQ2pUJ. 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.
Ryan Coleman
2012-Aug-08 16:16 UTC
Re: [Puppet Users] Re: Issues with installing some modules !!!
On Tue, Aug 7, 2012 at 10:44 PM, Rakesh K <rkathpal@gmail.com> wrote:> > Actually I have tried fresh install of the module multiple times after > clearing all traces of the mysql package on the client but still getting the > same result.Ok. Have you tried using the released Forge module instead of the GitHub code in development? http://forge.puppetlabs.com/puppetlabs/mysql> > I am using the same nodes.pp as above.... as the password is not set at all, > I hv not tried using the old_password parameter at all.If your machine already has a mysql server with a password set, you''ll need to supply that in the config_hash like you mentioned earlier (config_hash => { ''root_password'' => ''mypass'' }). You can test that your password is correct by logging into the mysql server directly (something like ''mysql -u root -P''). If you''re trying to change the mysql password with Puppet, you''ll need to do what Nan suggested for the config_hash paramater. class { ''mysql::server'': config_hash => { root_password => ''mypass'', old_root_password => ''oldpass'', } } If this is still not working after those declarations, could you include the full output of your agent run in --debug mode (puppet agent -t --debug)? Any relevant messages from your master would be useful as well.> > Please suggest.Let''s figure this out before we move onto the Dashboard. :-) -- 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.