Ask Your Question

java puppetserver 1.0 CA not working

asked 2015-01-14 14:57:07 -0600

lorcutt gravatar image

updated 2015-01-21 13:57:19 -0600

Hi - I'm doing some testing with the new java based puppetserver 1.0. I stood up a puppetmaster using it and it is able to serve content to itself. Now when I try to connect a client to it I seem to have issues with the CA functionality.

Both server and client are running RHEL6.

The puppet server has ca enabled in bootstrap.cfg:

On the client, I installed puppet 3.7.3, rm'd all contents from /var/lib/puppet/ssl for a fresh start, and have puppet.conf ca_server and server entries pointing to the new java based server. When I do a puppet agent run I get:

Error: Could not request certificate: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A

The server does not show anything with "puppet cert list".

On the client, running "openssl s_client -connect <servername>:8140" shows a few lines of concern:

depth=0 CN = <servername>
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = <servername>
verify error:num=27:certificate not trusted
verify return:1
depth=0 CN = <servername>
verify error:num=21:unable to verify the first certificate
verify return:1
140623348819784:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:184:
Certificate chain
 0 s:/CN=<servername>
   i:/CN=Puppet CA: <servername>
Server certificate
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID: 54B6D146C3D603F7EE01450645D6F46087F86D342D047A1C44D8055B93F1EB6F
    Master-Key: F10698FE583BB77FE5E43A51097C65B239FEAE201DA3414AFC0B955F15645D627FC7D28AFB7C3569F18AD0C3C4
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    Start Time: 1421267269
    Timeout   : 300 (sec)
    Verify return code: 21 (unable to verify the first certificate)

Setting the log level to DEBUG as requested below, I see the following in /var/log/puppetserver/puppetserver.log:

    2015-01-20 15:26:38,859 DEBUG [o.e.j.i.s.SslConnection] SslConnection@186b90e0{NEED_WRAP,eio=614/-1,di=-1} -> HttpConnection@2ee666de{FILLING} fill exit
    2015-01-20 15:26:38,860 DEBUG [o.e.j.s.HttpConnection] null cert chain
            at ~[na:1.7.0_65]
            at ~[na:1.7.0_65]
            at ~[na:1.7.0_65]
            at ~[na:1.7.0_65]
            at ~[na:1.7.0_65]
            at$DecryptedEndPoint.fill( ~[puppet-server-release.jar:na]
            at org.eclipse.jetty.server.HttpConnection.onFillable( ~[puppet-server-release.jar:na]
            at$ [puppet-server-release.jar:na]
            at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( [puppet-server-release.jar:na]
            at org.eclipse.jetty.util.thread.QueuedThreadPool$ [puppet-server-release.jar:na]
            at [na:1.7.0_65]
    Caused by: null cert chain
            at ...
edit retag flag offensive close merge delete


After the puppet agent run on your client, has a '/var/lib/puppet/ssl/certs/ca.pem' file been created? If not, I'd wonder if the initial SSL connection were failing due to a firewall or selinux being enabled. Would be interesting, then, to see if disabling those would help.

camlow325 gravatar imagecamlow325 ( 2015-01-15 00:56:46 -0600 )edit

If the "ca.pem" file has been created on the client, would be interesting to see what an "openssl s_client -connect <servername>:8140 -CAfile /var/lib/puppet/ssl/certs/ca.pem" run from the client would return.

camlow325 gravatar imagecamlow325 ( 2015-01-15 00:58:42 -0600 )edit

If the connection is being rejected by the Jetty server, you might be able to get more specific details from the "/var/log/puppetserver/puppetserver.log" file if you bump the jetty logger level in "/etc/puppetserver/logback.xml" to "DEBUG", "service puppetserver restart", and try another agent run.

camlow325 gravatar imagecamlow325 ( 2015-01-15 01:06:30 -0600 )edit

/var/lib/puppet/ssl/certs/ca.pem exists on the server. It works as a client to itself.

lorcutt gravatar imagelorcutt ( 2015-01-20 09:23:01 -0600 )edit

The openssl command gives basically the same output as already shown, expect that it starts with "140595356186440:error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen('/var/lib/puppet/ssl/certs/ca.pem','r')

lorcutt gravatar imagelorcutt ( 2015-01-20 09:24:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-27 12:12:12 -0600

lorcutt gravatar image

camlow325 provided the answer. The "client-auth" setting in /etc/puppetserver/conf.d/webserver.conf was set to "need", the correct setting was "want".

camlow325 - if you update your post to an answer I will mark it correct and remove this answer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-01-14 14:57:07 -0600

Seen: 598 times

Last updated: Jan 27 '15