0

So as in the title, whenever I try to "Run Puppet" from Foreman I get the following error in the GUI.

This was all due to, in the beginning a configuration error, where activemq needed to be set up. Once that was determined and set up correctly, I then began getting an ERF12-4252 error, that was corresponding to this error message below in the foreman-proxy logs.

W, [2016-10-02T11:12:17.782288 #1796] WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "-u", "root", "/opt/puppetlabs/bin/mco", "puppet", "runonce", "-I", ""]' E, [2016-10-02T11:12:17.782431 #1796] ERROR -- : Failed puppet run: Check Log files I, [2016-10-02T11:12:17.782622 #1796] INFO -- : x.x.x.x - - [02/Oct/2016:11:12:17 -0400] "POST /puppet/run HTTP/1.1" 500 34 0.0054

I was able to finally figure out where the problem was despite the logs being very vague, by adding a shell to the foreman-proxy user, and attempting to run that exact command from the CLI instead of through the Foreman GUI.

Marking this as solved.

9
  • Can you set :log_level to DEBUG in /etc/foreman-proxy/settings.yml, restart foreman-proxy, use the Run Puppet button again and provide the log file please? A 404 might suggest that the Puppet feature is failing to start on the smart proxy, so the log from startup should provide more info. Sep 27, 2016 at 8:26
  • Hopefully this sheds some light, but to me everything appears to be doing what it is supposed to. The only thing I left out was the certificate info from the logs as I didn't want to make some of the information printed out from that public. No errors regarding the certs though. pastebin.com/4SsXxwwR Sep 27, 2016 at 12:31
  • Here's the paste bin for the logs when "Run Puppet" is attempted from the GUI. pastebin.com/nkx63iYy Sep 27, 2016 at 17:10
  • Do you have sudo rules set up for foreman-proxy? See the command it's trying to execute. Sep 28, 2016 at 7:02
  • I do, and I verified the command it is trying to execute works when run on the command line. I also gave foreman-proxy a bash shell, su to foreman-proxy, and ran the command from the command line and it worked. Sep 28, 2016 at 12:07

1 Answer 1

0

This was all due to, in the beginning a configuration error, where activemq needed to be set up. Once that was determined and set up correctly, I then began getting an ERF12-4252 error, that was corresponding to this error message below in the foreman-proxy logs.

W, [2016-10-02T11:12:17.782288 #1796] WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "-u", "root", "/opt/puppetlabs/bin/mco", "puppet", "runonce", "-I", ""]' E, [2016-10-02T11:12:17.782431 #1796] ERROR -- : Failed puppet run: Check Log files I, [2016-10-02T11:12:17.782622 #1796] INFO -- : x.x.x.x - - [02/Oct/2016:11:12:17 -0400] "POST /puppet/run HTTP/1.1" 500 34 0.0054

I was able to finally figure out where the problem was despite the logs being very vague, by adding a shell to the foreman-proxy user, and attempting to run that exact command from the CLI instead of through the Foreman GUI.

You must log in to answer this question.

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