err: Could not request certificate when I run "puppet device"

552 views
Skip to first unread message

meiji wang

unread,
Nov 5, 2012, 4:18:03 PM11/5/12
to puppet...@googlegroups.com

1.       I get the following error when I run “puppet device’

err: Could not request certificate: Could not write /var/opt/lib/pe-puppet/devices/certname/ssl/private_keys/certname.pem to privatekeydir: Permission denied - /var/opt/lib/pe-puppet/devices/certname/ssl/private_keys/certname.pem

Any thought?


Thanks,

Gavin Williams

unread,
Nov 5, 2012, 4:35:01 PM11/5/12
to puppet...@googlegroups.com
Looks like a file permissions error - I had similar when I started playing with puppet device...

Check if the user you're running puppet as has permissions to write to '/var/opt/lib/pe-puppet/devices'.

HTH

Gav

meiji wang

unread,
Nov 5, 2012, 8:51:50 PM11/5/12
to puppet...@googlegroups.com
Although I change the mode to 0777, Puppet forces the mode to 0750

debug: /File[/var/opt/lib/pe-puppet/devices/certname/state]: Autorequiring File[/var/opt/lib/pe-puppet/devices/certname]
debug: /File[/var/opt/lib/pe-puppet/devices/certname/clientbucket]/mode: mode changed '0777' to '0750'
debug: /File[/var/opt/lib/pe-puppet/devices/certname/ssl]/mode: mode changed '0777' to '0771'
debug: /File[/var/opt/lib/pe-puppet/devices/certname/ssl/private]/mode: mode changed '0777' to '0750'
debug: /File[/var/opt/lib/pe-puppet/devices/certname/state]/mode: mode changed '0777' to '1755'
debug: /File[/var/opt/lib/pe-puppet/devices/certname/ssl/private_keys]/mode: mode changed '0777' to '0750'
debug: /File[/var/opt/lib/pe-puppet/devices/certname/client_yaml]/mode: mode changed '0777' to '0750'
debug: /File[/var/opt/lib/pe-puppet/devices/certname/client_data]/mode: mode changed '0777' to '0750'
info: Creating a new SSL key for certname
......

err: Could not request certificate: Could not write /var/opt/lib/pe-puppet/devices/certname/ssl/private_keys/certname.pem to privatekeydir: Permission denied - /var/opt/lib/pe-puppet/devices/certname/ssl/private_keys/certname.pem


then Puppet throws error message..

Meiji

fatmcgav

unread,
Nov 5, 2012, 9:16:54 PM11/5/12
to puppet...@googlegroups.com
Try changing the file owner/group to match what you're running puppet as...

Gav

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CEDQ4q9o5uEJ.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Piotr Jasiulewicz

unread,
Jul 18, 2013, 9:42:57 AM7/18/13
to puppet...@googlegroups.com
Hi,

have you solved the problem? Having the same issue.

Cheers,
Piotr

W dniu piątek, 17 maja 2013 15:04:22 UTC+1 użytkownik srivatsa rao napisał:
Hello Gav and Meiji,
I tried all the above.. still it doesn't solve my issue any further suggestion? 

my output when I run "puppet device --verbose"

# puppet device --verbose
info: starting applying configuration to sw1 at telnet://10.0.0.1/
info: Creating a new SSL key for sw1
err: Could not request certificate: Could not write /var/opt/lib/pe-puppet/devices/sw1/ssl/private_keys/sw1.pem to privatekeydir: Permission denied - /var/opt/lib/pe-puppet/devices/sw1/ssl/private_keys/sw1.pem
info: Creating a new SSL key for sw1
err: Could not request certificate: Could not write /var/opt/lib/pe-puppet/devices/sw1/ssl/private_keys/sw1.pem to privatekeydir: Permission denied - /var/opt/lib/pe-puppet/devices/sw1/ssl/private_keys/sw1.pem
info: Creating a new SSL key for sw1
err: Could not request certificate: Could not write /var/opt/lib/pe-puppet/devices/sw1/ssl/private_keys/sw1.pem to privatekeydir: Permission denied - /var/opt/lib/pe-puppet/devices/sw1/ssl/private_keys/sw1.pem
.
.
.
.

Thanks,
Vatsa

srivatsa rao

unread,
Jul 18, 2013, 1:10:17 PM7/18/13
to puppet...@googlegroups.com
Hey,
I tried a Lotta things. Nothing seemed to work so I bought up a new VM and carefully installed puppet following steps on website and things started to work.

But I always had a doubt that I did not have the config file right or once its wrong the changes does not take effect, just my guess. Try with config file if it doesn't work just resort to re-install.

Vatsa

Reply all
Reply to author
Forward
0 new messages