Search code examples
puppetforeman

foreman UI puppet run fails


I have foreman proxy running on port 8000.

foreman running on port 3000

puppetmaster service running on port 8140.

Also, I have 3 puppet agent configured,

  1. localhost puppet agent
  2. remote host agent 1
  3. remote host agent 2

When I execute puppet run from foreman GUI, localhost works fine, I am able to make puppet run on my master host. Because I added foreman-proxy in /etc/sudoers file and everything working fine.

But after making configuration changes for puppet classes for those two remote hosts, I tried to run puppet run from foreman GUI, but ended with the below errors.

I think it's unable to connect to the remote hosts...what do you think ?

Error: failed to execute puppetrun: ERF12-4252 [ProxyAPI::ProxyException]: Unable to execute Puppet run ([RestClient::RequestTimeout]: Request Timeout) for proxy http://domain.com:8000/puppet

UPDATE 1: I followed this article and opened port 8139 as mentioned and added listen=true in /etc/puppet/puppet.conf. Now I am getting this error

Error: failed to execute puppetrun: ERF12-4252 [ProxyAPI::ProxyException]: Unable to execute Puppet run ([RestClient::InternalServerError]: 500 Internal Server Error) for proxy http://lhdgameslab.com:8000/puppet

contents from /var/log/foreman-proxy/proxy.log

E, [2016-09-27T10:53:41.585056 #17092] ERROR -- : Failed puppet run: Check Log files
E, [2016-09-27T10:54:33.020211 #17092] ERROR -- : Failed puppet run: Check Log files
E, [2016-09-27T10:58:50.908303 #17092] ERROR -- : Failed puppet run: Check Log files
E, [2016-09-27T11:02:37.603161 #17092] ERROR -- : Failed puppet run: Check Log files
E, [2016-09-27T11:29:27.946510 #23644] ERROR -- : Failed puppet run: Check Log files
E, [2016-09-27T11:29:36.748147 #23644] ERROR -- : Failed puppet run: Check Log files

Server Puppet Version: 3.0.1

Agent Puppet Version : 2.7.11

UPDATE 2:

   [2016-09-27T12:05:35.403274 #26943] DEBUG -- : close: xxx.xxx.xx.xx:39355
D, [2016-09-27T12:05:44.330022 #26943] DEBUG -- : accept: xxx.xxx.xx.xx:39386
D, [2016-09-27T12:05:44.331547 #26943] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-09-27T12:05:44.336316 #26943] DEBUG -- : verifying remote client xxx.xxx.xx.xx against trusted_hosts ["xxx.com"]
D, [2016-09-27T12:05:44.337116 #26943] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request
D, [2016-09-27T12:05:44.338831 #26943] DEBUG -- : about to execute: ["/usr/bin/sudo", "/usr/sbin/puppetrun", "--host", "yyyy.com"]
W, [2016-09-27T12:05:45.270639 #26943]  WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "/usr/sbin/puppetrun", "--host", "yyyy.com"]'
E, [2016-09-27T12:05:45.271021 #26943] ERROR -- : Failed puppet run: Check Log files
D, [2016-09-27T12:05:45.271080 #26943] DEBUG -- : Failed puppet run: Check Log files
I, [2016-09-27T12:05:45.271835 #26943]  INFO -- : xxx.xxx.xx.xx - - [27/Sep/2016 12:05:45] "POST /puppet/run HTTP/1.1" 500 34 0.9376

Solution

  • Creating auth.conf in /etc/puppet location solved the issue....

    /etc/puppet/auth.conf

    path /run
    method save
    auth any
    allow *