puppet1>scp private_keys/puppetmaster2.pem root@puppet2:/var/lib/puppet/ssl/private_keys/puppetmaster2.pem
puppet1>scp ca/signed/puppetmaster2.pem root@puppet2:/var/lib/puppet/ssl/certs/puppetmaster2.pem
puppet1>scp ca/ca_crt.pem root@puppet2:/var/lib/puppet/ssl/certs/ca.pem
I get the following error:
"Starting puppetmaster: Could not prepare for execution: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key"
Does anyone have a better system for handling the generation and distribution of SSL certs?
Please advise.
Thanks,
Hello Gang,I'm working on scaling my puppet solution, and I'm deploying multiple masters w/ passenger that are going sit behind a load balancer. If anyone is using these type of setup, would you share how you deal with the SSL certs? I've been following Bode's Blog (http://bodepd.com/wordpress/?p=7), and it's not working to good for me. For instance I generate the ssl cert from the 1st master, and I copy it over to the 2nd puppetmaster:
> Here's the puppet.conf that i'm distributing to the puppetmasters:
>
> [puppetmasterd]
> certname=puppetmaster2.dev.domain.com
>
>
>
> My main idea is to have one puppetmaster per datacenter syncing with the main puppetmaster. I'm going to make sure that each datacenter resolves to their local puppetmaster via load balancer appliance (bigIP). The main puppetmaster also hosts the mysql database, which is dual replicated with another server, and which is also accessed via virtual name/ Load balance. I know it's a little ambitious but ironing out the SSL certs situation would certainly put the last nail on the coffin.
>
> Thanks,
So, you tell the puppetmaster the certname is "puppetmaster2.dev.domain.com", but you're generating a cert named "puppetmaster2". You should either change one or the other.
> Thanks for your reply. At this juncture, I'm doing it by the book and it's still failing for me. Can someone spot what I'm doing wrong here?:
>
> puppetmasterd --no-daemonize --verbose --certname puppet-test01.dev.domain.com
> "Could not prepare for execution: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key"
>
>
> Generated from Main Puppetmaster with:
> sudo /usr/sbin/puppetca --generate --certdnsnames puppet:puppet.glb.domain.com puppet-test01.dev.domain.com
>
>
> The Files are there:
> puppet-test01 puppet # ls -ltr /etc/puppet/ssl/private_keys/
> total 4
> -rw------- 1 puppet root 887 Feb 9 10:08 puppet-test01.dev.domain.com.pem
> puppet-test01 puppet # ls -ltr /etc/puppet/ssl/certs
> total 8
> -rw-r--r-- 1 puppet root 960 Feb 9 10:09 puppet-test01.dev.domain.com.pem
> -rw-r--r-- 1 puppet root 765 Feb 9 10:11 ca.pem
With your current config file, "there" should be /var/lib/puppet/ssl, not /etc/puppet/ssl. Check by running this on puppet-test1:
puppetmasterd --genconfig | grep 'ssldir ='
It will probably return "ssldir = /var/lib/puppet/ssl" telling you the ssl directory is in "/var/lib/puppet/ssl".