I have a puppetmaster module. In it is an ''ensure => running'' declaration. Runs of puppetd fail on this with the following error: err: /Stage[main]/Puppet::Master/Service[puppetmasterd]/ensure: change from stopped to running failed: Could not start Service[puppetmasterd]: Execution of ''/sbin/service puppetmasterd start'' returned 1: at /etc/puppet/modules/puppet/manifests/master.pp: 15 I assume that it is failing because puppetmasterd is already running (hence the return code of ''1''). But why does ''ensure => running'' try to restart the service, rather than just verify that it is running and take action based on the response received? Here is the module: class puppet::master { include puppet include puppet::params package { "puppet-server": ensure => installed, } service { "puppetmasterd": ensure => running, hasstatus => true, hasrestart => false, enable => true, require => File["/etc/puppet/puppet.conf"] } } I changes hasrestart to false, thinking that is why i t was attempting restart, but the error continues. I should also add that I''m a complete newb to puppet, so I''m sure I''ve made a mistake. Thank you all kindly in advance. -- 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 Oct 3, 2011, at 6:50 AM, Sam wrote:> I have a puppetmaster module. In it is an ''ensure => running'' > declaration. Runs of puppetd fail on this with the following error: > > err: /Stage[main]/Puppet::Master/Service[puppetmasterd]/ensure: change > from stopped to running failed: Could not start > Service[puppetmasterd]: Execution of ''/sbin/service puppetmasterd > start'' returned 1: at /etc/puppet/modules/puppet/manifests/master.pp: > 15 > > I assume that it is failing because puppetmasterd is already running > (hence the return code of ''1''). But why does ''ensure => running'' try > to restart the service, rather than just verify that it is running and > take action based on the response received? > > Here is the module: > > > class puppet::master { > include puppet > include puppet::params > > package { "puppet-server": > ensure => installed, > } > > service { "puppetmasterd": > ensure => running, > hasstatus => true, > hasrestart => false, > enable => true, > require => File["/etc/puppet/puppet.conf"] > } > } > > > I changes hasrestart to false, thinking that is why i t was attempting > restart, but the error continues. > > I should also add that I''m a complete newb to puppet, so I''m sure I''ve > made a mistake.---- hasrestart should be set to true I have had a bit of a struggle myself with puppetmasterd but I never used puppet itself to maintain the status because if the master isn''t running, nothing is going to be working anyway. Specifically, when you run into a problem with a service, you should try to execute from the command line, essentially duplicating the process that puppet would go through itself... [sudo] /sbin/service puppetmasterd status [sudo] /sbin/service puppetmasterd restart and see what comes from those commands. Of course the status of the puppetmasterd service is dependent upon the actual methods of installing and implementing them. When I was first starting out, I was running the puppetmasterd service and it was using webrick to offer the http/https connections to the clients. Once I switched to apache (actually now nginx) and passenger, then the puppetmasterd service had to be turned off because it was provided by the web server. Also, in my case, I installed puppet from gems and it seemed to want to locate the PID file in /var/run/puppet which didn''t exist so I had to tailor the init.d script to do things like... if [ ! -d /var/run/puppet ]; then mkdir -p /var/run/puppet fi chown puppet:puppet /var/run/puppet first, before actually starting up, but again, I am using Ubuntu and installed from the gem source so I would suspect that your mileage will indeed vary. Craig -- 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.
I think that the issue is due to my puppet installation (from EPEL) not configuring the init.d script properly. puppetmasterd doesn''t think it is a service. Thanks for pointing me in the right direction. On Mon, Oct 3, 2011 at 10:27 AM, Craig White <craig.white@ttiltd.com> wrote:> > On Oct 3, 2011, at 6:50 AM, Sam wrote: > > > I have a puppetmaster module. In it is an ''ensure => running'' > > declaration. Runs of puppetd fail on this with the following error: > > > > err: /Stage[main]/Puppet::Master/Service[puppetmasterd]/ensure: change > > from stopped to running failed: Could not start > > Service[puppetmasterd]: Execution of ''/sbin/service puppetmasterd > > start'' returned 1: at /etc/puppet/modules/puppet/manifests/master.pp: > > 15 > > > > I assume that it is failing because puppetmasterd is already running > > (hence the return code of ''1''). But why does ''ensure => running'' try > > to restart the service, rather than just verify that it is running and > > take action based on the response received? > > > > Here is the module: > > > > > > class puppet::master { > > include puppet > > include puppet::params > > > > package { "puppet-server": > > ensure => installed, > > } > > > > service { "puppetmasterd": > > ensure => running, > > hasstatus => true, > > hasrestart => false, > > enable => true, > > require => File["/etc/puppet/puppet.conf"] > > } > > } > > > > > > I changes hasrestart to false, thinking that is why i t was attempting > > restart, but the error continues. > > > > I should also add that I''m a complete newb to puppet, so I''m sure I''ve > > made a mistake. > ---- > hasrestart should be set to true > > I have had a bit of a struggle myself with puppetmasterd but I never used > puppet itself to maintain the status because if the master isn''t running, > nothing is going to be working anyway. > > Specifically, when you run into a problem with a service, you should try to > execute from the command line, essentially duplicating the process that > puppet would go through itself... > > [sudo] /sbin/service puppetmasterd status > [sudo] /sbin/service puppetmasterd restart > > and see what comes from those commands. Of course the status of the > puppetmasterd service is dependent upon the actual methods of installing and > implementing them. When I was first starting out, I was running the > puppetmasterd service and it was using webrick to offer the http/https > connections to the clients. Once I switched to apache (actually now nginx) > and passenger, then the puppetmasterd service had to be turned off because > it was provided by the web server. > > Also, in my case, I installed puppet from gems and it seemed to want to > locate the PID file in /var/run/puppet which didn''t exist so I had to tailor > the init.d script to do things like... > > if [ ! -d /var/run/puppet ]; then > mkdir -p /var/run/puppet > fi > chown puppet:puppet /var/run/puppet > > first, before actually starting up, but again, I am using Ubuntu and > installed from the gem source so I would suspect that your mileage will > indeed vary. > > Craig > > -- > 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.
The actual issue is that in version 2.6.9, the service is installed as "puppetmaster" in init.d instead of "puppetmasterd". Easy fix, once I had my head in the right place. Thanks again. On Mon, Oct 3, 2011 at 12:23 PM, Sam Roza <samroza@gmail.com> wrote:> I think that the issue is due to my puppet installation (from EPEL) not > configuring the init.d script properly. puppetmasterd doesn''t think it is a > service. > > Thanks for pointing me in the right direction. > > > On Mon, Oct 3, 2011 at 10:27 AM, Craig White <craig.white@ttiltd.com>wrote: > >> >> On Oct 3, 2011, at 6:50 AM, Sam wrote: >> >> > I have a puppetmaster module. In it is an ''ensure => running'' >> > declaration. Runs of puppetd fail on this with the following error: >> > >> > err: /Stage[main]/Puppet::Master/Service[puppetmasterd]/ensure: change >> > from stopped to running failed: Could not start >> > Service[puppetmasterd]: Execution of ''/sbin/service puppetmasterd >> > start'' returned 1: at /etc/puppet/modules/puppet/manifests/master.pp: >> > 15 >> > >> > I assume that it is failing because puppetmasterd is already running >> > (hence the return code of ''1''). But why does ''ensure => running'' try >> > to restart the service, rather than just verify that it is running and >> > take action based on the response received? >> > >> > Here is the module: >> > >> > >> > class puppet::master { >> > include puppet >> > include puppet::params >> > >> > package { "puppet-server": >> > ensure => installed, >> > } >> > >> > service { "puppetmasterd": >> > ensure => running, >> > hasstatus => true, >> > hasrestart => false, >> > enable => true, >> > require => File["/etc/puppet/puppet.conf"] >> > } >> > } >> > >> > >> > I changes hasrestart to false, thinking that is why i t was attempting >> > restart, but the error continues. >> > >> > I should also add that I''m a complete newb to puppet, so I''m sure I''ve >> > made a mistake. >> ---- >> hasrestart should be set to true >> >> I have had a bit of a struggle myself with puppetmasterd but I never used >> puppet itself to maintain the status because if the master isn''t running, >> nothing is going to be working anyway. >> >> Specifically, when you run into a problem with a service, you should try >> to execute from the command line, essentially duplicating the process that >> puppet would go through itself... >> >> [sudo] /sbin/service puppetmasterd status >> [sudo] /sbin/service puppetmasterd restart >> >> and see what comes from those commands. Of course the status of the >> puppetmasterd service is dependent upon the actual methods of installing and >> implementing them. When I was first starting out, I was running the >> puppetmasterd service and it was using webrick to offer the http/https >> connections to the clients. Once I switched to apache (actually now nginx) >> and passenger, then the puppetmasterd service had to be turned off because >> it was provided by the web server. >> >> Also, in my case, I installed puppet from gems and it seemed to want to >> locate the PID file in /var/run/puppet which didn''t exist so I had to tailor >> the init.d script to do things like... >> >> if [ ! -d /var/run/puppet ]; then >> mkdir -p /var/run/puppet >> fi >> chown puppet:puppet /var/run/puppet >> >> first, before actually starting up, but again, I am using Ubuntu and >> installed from the gem source so I would suspect that your mileage will >> indeed vary. >> >> Craig >> >> -- >> 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.
Sam Roza wrote:> I think that the issue is due to my puppet installation (from EPEL) > not configuring the init.d script properly.It''s configured fine as it is. :)> puppetmasterd doesn''t think it is a service.You want to use service { ''puppetmaster'': ... } in your manifests. -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A penny saved kills your career in government.
This was a module out of the puppetmaster printed book. I''ve found a few other typos as well...perhaps I should disregard it if it''s not accurate. On Mon, Oct 3, 2011 at 7:27 PM, Todd Zullinger <tmz@pobox.com> wrote:> Sam Roza wrote: > > I think that the issue is due to my puppet installation (from EPEL) > > not configuring the init.d script properly. > > It''s configured fine as it is. :) > > > puppetmasterd doesn''t think it is a service. > > You want to use service { ''puppetmaster'': ... } in your manifests. > > -- > Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > A penny saved kills your career in government. > >-- 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.