puppetd[4554]: could not retrieve catalog from remote server: ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed
puppetd[4554]: Not using cache on failed catalog
puppetd[4554]: Could not retrieve catalog; skipping run
puppetd[4961]: Retrieving plugin
puppetd[4961]: (/File[/var/lib/puppet/lib]) Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
puppetd[4961]: (/File[/var/lib/puppet/lib]) Failed to retrieve current state of resource: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Could not retrieve file metadata for puppet://puppet/plugins: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
I've gone through the usual SSL troubleshooting: the clocks are in sync, the client cert matches the one issued to it by the server (and is decodable by the private_key).
When I use tshark to watch the ssl traffic, I see that the client is rejecting the server with the following ssl error. The connection never makes it to the back-end server, because the client hangs up. (10.1.1.1 is this client, 10.0.0.1 is the puppet vip)
[root@db9 /var/lib/puppet/ssl]# tshark -n -i bond0 -d tcp.port==8140,ssl -s2000 'port 8140 and len > 60'
0.000000 10.1.1.1 -> 10.0.0.1 TCP 29718 > 8140 [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1862094055 TSER=0 WS=7
0.001585 10.1.1.1 -> 10.0.0.1 SSLv2 Client Hello
0.001713 10.0.0.1 -> 10.1.1.1 TLSv1 Server Hello, Certificate, Certificate Request, Server Hello Done
0.002208 10.1.1.1 -> 10.0.0.1 TLSv1 Alert (Level: Fatal, Description: Unknown CA)
But openssl with the same cert and key that puppet is using passes verification and connects successfully:
openssl s_client -connect puppet:8140 -cert certs/db9.domain.com.pem -key private_keys/db9.domain.com.pem -showcerts -state -verify 2
103.115871 10.1.1.1 -> 10.0.0.1 TCP 40758 > 8140 [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1862197169 TSER=0 WS=7
103.116949 10.1.1.1 -> 10.0.0.1 SSLv2 Client Hello
103.117078 10.0.0.1 -> 10.1.1.1 TLSv1 Server Hello, Certificate, Certificate Request, Server Hello Done
103.121057 10.1.1.1 -> 10.0.0.1 TLSv1 Certificate, Client Key Exchange, Certificate Verify, Change Cipher Spec, Encrypted Handshake Message
103.122162 10.0.0.1 -> 10.1.1.1 TLSv1 Change Cipher Spec, Encrypted Handshake Message
Any thoughts on what could be causing this failure? I've seen quite a few odd ones (#3120, #4948 for example) but I've been gnawing at this one all day and haven't figured it out.
-=Eric
This certainly means your local node CA cert is not able to verify the
server proposed certificate (probably because the server advertised cert
hasn't been signed by this CA, or you use a CA chain but don't send the
full chain to the client).
> I've gone through the usual SSL troubleshooting: the clocks are in
> sync, the client cert matches the one issued to it by the server (and
> is decodable by the private_key).
>
> When I use tshark to watch the ssl traffic, I see that the client is
> rejecting the server with the following ssl error. The connection
> never makes it to the back-end server, because the client hangs up.
> (10.1.1.1 is this client, 10.0.0.1 is the puppet vip)
>
> [root@db9 /var/lib/puppet/ssl]# tshark -n -i bond0 -d tcp.port==8140,ssl -s2000 'port 8140 and len > 60'
> 0.000000 10.1.1.1 -> 10.0.0.1 TCP 29718 > 8140 [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1862094055 TSER=0 WS=7
> 0.001585 10.1.1.1 -> 10.0.0.1 SSLv2 Client Hello
> 0.001713 10.0.0.1 -> 10.1.1.1 TLSv1 Server Hello, Certificate, Certificate Request, Server Hello Done
> 0.002208 10.1.1.1 -> 10.0.0.1 TLSv1 Alert (Level: Fatal, Description: Unknown CA)
>
> But openssl with the same cert and key that puppet is using passes verification and connects successfully:
>
> openssl s_client -connect puppet:8140 -cert certs/db9.domain.com.pem -key private_keys/db9.domain.com.pem -showcerts -state -verify 2
You didn't ask openssl s_client to actually check the server certificate
against the CA cert of the client.
Can you try:
openssl s_client -connect puppet:8140 -CAfile certs/ca.pem -cert certs/db9.domain.com.pem -key private_keys/db9.domain.com.pem -showcerts -state -verify 2
> 103.115871 10.1.1.1 -> 10.0.0.1 TCP 40758 > 8140 [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1862197169 TSER=0 WS=7
> 103.116949 10.1.1.1 -> 10.0.0.1 SSLv2 Client Hello
> 103.117078 10.0.0.1 -> 10.1.1.1 TLSv1 Server Hello, Certificate, Certificate Request, Server Hello Done
> 103.121057 10.1.1.1 -> 10.0.0.1 TLSv1 Certificate, Client Key Exchange, Certificate Verify, Change Cipher Spec, Encrypted Handshake Message
> 103.122162 10.0.0.1 -> 10.1.1.1 TLSv1 Change Cipher Spec, Encrypted Handshake Message
>
> Any thoughts on what could be causing this failure? I've seen quite a
> few odd ones (#3120, #4948 for example) but I've been gnawing at this
> one all day and haven't figured it out.
For an unknown reason your local node CA cert is not correct.
You can solve this by overwriting it with the main CA cert, or check
that your server certificate is indeed correctly signed by the CA you
think it was signed with.
--
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!
Thanks for the follow up Eric, please let us know if you figure this
out. I suspect I'm going to run into this as well and may have
working with someone in training yesterday.
-Jeff
I believe it's is related to changing the name of the issuer for the CA, from here:
http://www.mail-archive.com/puppe...@googlegroups.com/msg09176.html
When I have an empty CRL, the clients work fine. The crl looks like:
# openssl crl -noout -in ca_crl.pem -text
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Issuer: /CN=ca
Last Update: Feb 19 01:46:28 2011 GMT
Next Update: Feb 18 01:46:28 2016 GMT
CRL extensions:
X509v3 CRL Number:
0
No Revoked Certificates.
and it passes validation:
# openssl crl -noout -CAfile ./ca_crt.pem -in ca_crl.pem -issuer
verify OK
issuer=/CN=ca
As soon as I --clean a client, the CRL gets rewritten and starts failing:
# openssl crl -noout -in ca_crl_fatal.pem -text
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Issuer: /CN=Puppet CA: puppetmaster001
Last Update: Feb 19 01:21:00 2011 GMT
Next Update: Feb 18 01:21:00 2016 GMT
CRL extensions:
X509v3 CRL Number:
7
[some revoked certs here]
# openssl crl -noout -CAfile ./ca_crt.pem -in ca_crl_fatal.pem -text
Error getting CRL issuer certificate
Could it be that the issuer name change is causing the ssl client libraries to fail to match up the CRL with the issuing CA?
- Eric Sorenson - N37 17.255 W121 55.738 - http://twitter.com/ahpook -
Definitely. This CRL is not related to your CA cert in any way. It's
probably a bug that the CRL is created this way.
Can you find a CA cert with the Subject CN as in the Issuer field above
anywhere on your system?
Regards,
Felix