Puppet Run giving Error: failed to execute puppetrun: ERF12-4252

foremanpuppet

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.

Best Answer

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.