Re: [Puppet Users] Puppet client won't autostart

455 views
Skip to first unread message

Martin Alfke

unread,
Nov 13, 2012, 8:39:17 AM11/13/12
to puppet...@googlegroups.com
Hi Bret,

On 13.11.2012, at 13:18, Bret Wortman wrote:

I'm getting this problem on all the puppet client's I've been setting up and it's got me both scratching my head (because I'm not seeing anything obvious in any system logs) and pausing in my rollout until I get it solved:

# puppet resource service puppet ensure=running enable=true

does the service script has a status option and does the status deliver proper results?

service puppet status

Some service scripts do not check properly for the status or they deliver wrong exit codes.
If this is the case you can set
hasstatus => false

hth,

Martin
Error: Could not start Service[puppet]: Execution of '/sbin/service puppet start' returned 1:
Error: /Service[puppet]/ensure: change from stopped to running failed: Could not start Service[puppet]: Execution of '/sbin/service puppet start' returned 1:
service { 'puppet':
  ensure => 'stopped',
  enable => 'false',
}
# ps aux | grep 'puppet agent' | grep -v grep
# puppet agent 
# ps aux | grep 'puppet agent' | grep -v grep
root 55055 12.4  0.1 383924 45928 ?       Ssl   07:15    0:01 /usr/bin/ruby /bin/puppet agent
#

Where should I look first? I'm not sure why this will start for me interactively but not from the agent (this also fails if the agent is already running in exactly the same fashion).

Thanks!


Bret Wortman

--
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/-/Craxa7MPMXUJ.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Bret Wortman

unread,
Nov 13, 2012, 9:29:04 AM11/13/12
to puppet...@googlegroups.com
It does not (and this is odd since I'm using F17):

# service puppet status
Redirecting to /bin/systemctl  status puppet.service
puppet.service
         Loaded: error (Reason: No such file or directory)
         Active: inactive (dead)

and yet ps still shows it running.

But with your help, this at least starts it now, but I can't get the "ensure" bit working, and that's the really critical piece for us. Looks like Puppet is expecting to chkconfig this and that's not working. I also have no file in /etc/init.d at all, so there's apparently no start script on my system at all. I installed from the Puppetlabs repos.

# puppet resource service puppet hasstatus=false ensure=running enable=true
Error: Could not enable puppet: Execution of '/sbin/chkconfig puppet on' returned 1: error reading information on service puppet: No such file or directory
:
:
service { 'puppet':
  ensure => running,
  enable => false,
}
#

Darin Perusich

unread,
Nov 13, 2012, 9:46:46 AM11/13/12
to puppet...@googlegroups.com
This is systemd weirdness. I've run into this error before on SuSE
with other init scripts and the fix was to reboot the machine. Then
you won't get the "Loaded: error (Reason: No such file or directory)"
anymore.

--
Later,
Darin
> https://groups.google.com/d/msg/puppet-users/-/62Ns4IuyUJgJ.

jcbollinger

unread,
Nov 13, 2012, 9:58:57 AM11/13/12
to puppet...@googlegroups.com


On Tuesday, November 13, 2012 7:40:08 AM UTC-6, Martin Alfke wrote:
Hi Bret,

On 13.11.2012, at 13:18, Bret Wortman wrote:

I'm getting this problem on all the puppet client's I've been setting up and it's got me both scratching my head (because I'm not seeing anything obvious in any system logs) and pausing in my rollout until I get it solved:

# puppet resource service puppet ensure=running enable=true

does the service script has a status option and does the status deliver proper results?

service puppet status

Some service scripts do not check properly for the status or they deliver wrong exit codes.
If this is the case you can set
hasstatus => false


Or, better, fix the service script.  Note that Puppet cares only about the exit code; it ignores the output and error streams.  Be sure to check / fix the exit codes of all initscript actions, but especially "start", "stop", "status", and "restart" actions.


John

Bret Wortman

unread,
Nov 13, 2012, 11:30:01 AM11/13/12
to puppet...@googlegroups.com
This problem has continued through multiple reboots across multiple systems.

Bret Wortman

unread,
Nov 13, 2012, 11:31:14 AM11/13/12
to puppet...@googlegroups.com
It is kind of funny that we're talking about using puppet's tricks for working around bad start scripts for puppet's own software....

Michael Stahnke

unread,
Nov 13, 2012, 12:03:12 PM11/13/12
to puppet...@googlegroups.com
> --
> 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/-/4vZduFoHCrYJ.
>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

Please try not to top post. It makes following the conversation very difficult.


This is probably something to do with either

1. Puppet init script with systemd
2. Puppet's interaction with systemd.

Both are really new and honestly, I'm certain they're not bug free
yet. If you could file a bug we'll look into this. I've noticed the
issue too on one of my home systems and just haven't looked into it
yet.

http://projects.puppetlabs.com/projects/puppet-community-pkg-repo/issues/new

Bret Wortman

unread,
Nov 13, 2012, 12:33:10 PM11/13/12
to puppet...@googlegroups.com
For you, maybe. For old school guys like me, it's quite natural. But I'll try to force Google Groups to comply. ;-) 

This is probably something to do with either

1.  Puppet init script with systemd
2.  Puppet's interaction with systemd.

Both are really new and honestly, I'm certain they're not bug free
yet.  If you could file a bug we'll look into this.  I've noticed the
issue too on one of my home systems and just haven't looked into it
yet.

Will do, and I'm happy to help out in any way I can. I love the tool and appreciate your commitment to open source and community-supported versions. Thanks for your help!

http://projects.puppetlabs.com/projects/puppet-community-pkg-repo/issues/new

Bret Wortman

unread,
Nov 20, 2012, 7:44:42 AM11/20/12
to puppet...@googlegroups.com
Just to finish this one up, I had the service name wrong.

# puppet resource service puppetagent enable=yes ensure=running

Works just fine.


Bret

Jakov Sosic

unread,
Nov 20, 2012, 6:06:18 PM11/20/12
to puppet...@googlegroups.com
On 11/13/2012 03:46 PM, Darin Perusich wrote:
> This is systemd weirdness. I've run into this error before on SuSE
> with other init scripts and the fix was to reboot the machine. Then
> you won't get the "Loaded: error (Reason: No such file or directory)"
> anymore.

:-/

A little offtopic but I'm not looking forward to RHEL v7 and derivatives
because of things like systemd... Don't fix it if ain't broken, and
standard init served us well for quite some time...


--
Jakov Sosic
www.srce.unizg.hr
Reply all
Reply to author
Forward
0 new messages