I am facing issue on puppet run from foreman console. This is the error
message:
failed to execute puppetrun: ERF12-4252 [ProxyAPI::ProxyException]: Unable
to execute Puppet run ([RestClient::InternalServerError]: 500 Internal
Server Error) for proxy
I am using mcollective option to enable puppet run. This is the version
details:
···
On Friday, November 4, 2016 at 6:57:22 PM UTC+5:30, Sanjiv wrote:
>
> Hi,
>
> I am facing issue on puppet run from foreman console. This is the error
> message:
>
> failed to execute puppetrun: ERF12-4252 [ProxyAPI::ProxyException]: Unable
> to execute Puppet run ([RestClient::InternalServerError]: 500 Internal
> Server Error) for proxy
>
> I am using mcollective option to enable puppet run. This is the version
> details:
>
> Puppet Version: 4.7.0
> MCollective: 2.9.0
> Foreman: 1.12.3
>
> I am able to run the "mco puppet runonce -F fact=xyz" from command line.
>
> I am following the foreman 1.12 manual to enable puppetrun using
> MCollective. I did following changes:
>
> 1. Changes in file /etc/foreman-proxy/settings.d/puppet.yml
> :enabled: https
> :puppet_version: 4.7.0
> :use_provider: puppet_proxy_mcollective
>
> 2. Added following in file /etc/puppetlabs/puppet/auth.conf
> path /puppet/v3/environments
> method find
> allow *
>
> path /puppet/v3/resource_type
> method search
> allow *
>
> 3. In /etc/sudoers file
> Defaults:foreman-proxy !requiretty
> foreman-proxy ALL = NOPASSWD: /usr/bin/mco puppet runonce *
>
> 4. Then I restart all the services
> "puppetserver","foreman","foreman-proxy" and "mcollective" as well.
>
> But I am still facing the same issue. Am I missing anything?
>
> Any help is highly appreciated.
>
> Thanks,
> Sanjiv
>
>
>
This is fixed. In my case issue was mismatch in hostname and certificate
name. My hostname is the mixture of capital and small letters but puppet
always generate the certificate in lower case. After changing hostname it
is working fine.
···
On Friday, November 4, 2016 at 6:57:22 PM UTC+5:30, Sanjiv wrote:
>
> Hi,
>
> I am facing issue on puppet run from foreman console. This is the error
> message:
>
> failed to execute puppetrun: ERF12-4252 [ProxyAPI::ProxyException]: Unable
> to execute Puppet run ([RestClient::InternalServerError]: 500 Internal
> Server Error) for proxy
>
> I am using mcollective option to enable puppet run. This is the version
> details:
>
> Puppet Version: 4.7.0
> MCollective: 2.9.0
> Foreman: 1.12.3
>
> I am able to run the "mco puppet runonce -F fact=xyz" from command line.
>
> I am following the foreman 1.12 manual to enable puppetrun using
> MCollective. I did following changes:
>
> 1. Changes in file /etc/foreman-proxy/settings.d/puppet.yml
> :enabled: https
> :puppet_version: 4.7.0
> :use_provider: puppet_proxy_mcollective
>
> 2. Added following in file /etc/puppetlabs/puppet/auth.conf
> path /puppet/v3/environments
> method find
> allow *
>
> path /puppet/v3/resource_type
> method search
> allow *
>
> 3. In /etc/sudoers file
> Defaults:foreman-proxy !requiretty
> foreman-proxy ALL = NOPASSWD: /usr/bin/mco puppet runonce *
>
> 4. Then I restart all the services
> "puppetserver","foreman","foreman-proxy" and "mcollective" as well.
>
> But I am still facing the same issue. Am I missing anything?
>
> Any help is highly appreciated.
>
> Thanks,
> Sanjiv
>
>
>