"Failed to run puppetca"

CentOS 6.4, with Foreman 1.2, Puppet 3.2, the proxy complains:
D, [2013-07-14T18:59:26.807795 #1168] DEBUG – : Found puppetca at
/usr/bin/puppet
D, [2013-07-14T18:59:26.808014 #1168] DEBUG – : Found sudo at /usr/bin/sudo
D, [2013-07-14T18:59:26.808100 #1168] DEBUG – : Executing /usr/bin/sudo -S
/usr/bin/puppet cert --list --all
W, [2013-07-14T18:59:26.884836 #1168] WARN – : Failed to run puppetca:
E, [2013-07-14T18:59:26.885201 #1168] ERROR – : Failed to list
certificates: Execution of puppetca failed, check log files

However:
[root@foreman logs]# /usr/bin/sudo -S /usr/bin/puppet cert --list --all

  • "foreman.xiolab.lab.abc.com" (SHA1)
    D5:8D:E9:5D:D3:6B:4F:A7:CB:F0:E6:AA:9B:4E:9B:8B:85:0B:61:5F (alt names:
    "DNS:foreman.xiolab.lab.abc.com", "DNS:puppet",
    "DNS:puppet.xiolab.lab.abc.com")

Reply to self: hidden in the manual, under section 4.3.2, SmartProxy
settings, it mentions that one needs to edit the sudoers file to make it
work.
Edited, it works. Problem solved.
Now to understanding why certificate requests are not processed… :frowning:

··· On Sunday, July 14, 2013 7:05:19 PM UTC+3, Yaniv Kaul wrote:

CentOS 6.4, with Foreman 1.2, Puppet 3.2, the proxy complains:
D, [2013-07-14T18:59:26.807795 #1168] DEBUG – : Found puppetca at
/usr/bin/puppet
D, [2013-07-14T18:59:26.808014 #1168] DEBUG – : Found sudo at
/usr/bin/sudo
D, [2013-07-14T18:59:26.808100 #1168] DEBUG – : Executing /usr/bin/sudo
-S /usr/bin/puppet cert --list --all
W, [2013-07-14T18:59:26.884836 #1168] WARN – : Failed to run puppetca:
E, [2013-07-14T18:59:26.885201 #1168] ERROR – : Failed to list
certificates: Execution of puppetca failed, check log files

However:
[root@foreman logs]# /usr/bin/sudo -S /usr/bin/puppet cert --list --all