Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
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? –  Shane Madden Oct 17 '12 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 '12 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. –  Shane Madden Oct 17 '12 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 '12 at 6:11

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.