1

I ran puppet apply and got an error. Is there any way that I can get more details on this error?

err: /Stage[main]/XX/Service[xx]: Failed to call refresh: Could not restart Service[xx]: Execution of '/etc/init.d/xx restart' returned 1: at /etc/puppet/manifests/xx/xx.pp:20

4
  • 1
    Does the init script return an exit code of 0 when you manually run the /etc/init.d/xx restart that Puppet is attempting? Oct 17, 2012 at 5:18
  • I can't reproduce the error at the moment. Are there no logs and the solution is to just try it manually and see what the error is?
    – benmccann
    Oct 17, 2012 at 5:27
  • What you've got pretty much is the log - the fact that it got a non-zero status code is about all the info that Puppet has. Are you sure it's getting a good response code? Run /etc/init.d/xx restart; echo $? and see what the output looks like. Oct 17, 2012 at 5:33
  • Well presumably /etc/init.d/xx restart produced some error which puppet swallowed. That restart call is working fine for me now, but it's still good to know if I run into a service failing to start in the future that I need to try it manually to see what the error is. I'd accept your answer as an answer except it's a comment, so I can't :-)
    – benmccann
    Oct 17, 2012 at 6:11

1 Answer 1

3

Use puppet apply --debug to get more output. With puppet apply there is no logfile at all but you can redirect the output with --logdest to a file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .