Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

certificate verify failed (unable to get issuer certificate) #48

Open
@muscat

Description

@muscat

hi!

I'm trying to use your image on a Raspberry Pi 4.
aarch64 (ARM), 8Gb RAM, 22Gb free disk space.

I'm launching it with the recommended parameters:
docker run --name puppet --hostname puppet.vpn.rv.ua -p 8140:8140 -v ./code:/etc/puppetlabs/code -v ./ca:/etc/puppetlabs/puppetserver/ca ghcr.io/voxpupuli/container-puppetserver

The server starts up. Here are the logs.

System configuration values:
* HOSTNAME: 'puppet.vpn.rv.ua'
* hostname -f: 'puppet.vpn.rv.ua'
* PUPPETSERVER_HOSTNAME: 'puppet'
* PUPPETSERVER_PORT: '8140'
* Certname: 'puppet.pem'
* DNS_ALT_NAMES: ''
* SSLDIR: '/etc/puppetlabs/puppet/ssl'
CA Certificate:
subject=CN = "Puppet CA generated on puppet.vpn.rv.ua at 2024-01-16 14:31:17 +0000"
issuer=CN = Puppet Root CA: 1b57b4220adc31
        X509v3 extensions:
            X509v3 Basic Constraints: critical
                CA:TRUE
            X509v3 Key Usage: critical
                Certificate Sign, CRL Sign
            X509v3 Subject Key Identifier: 
                4D:A0:F5:23:FC:B6:4A:4E:7F:EF:39:6C:E0:7D:73:1A:AB:60:9F:E8
            Netscape Comment: 
                Puppet Server Internal Certificate
            X509v3 Authority Key Identifier: 
                16:6C:70:7B:5D:56:FE:35:13:4F:64:1D:34:1C:C5:74:83:8C:26:B6
Certificate puppet.pem:
subject=CN = puppet
issuer=CN = "Puppet CA generated on puppet.vpn.rv.ua at 2024-01-16 14:31:17 +0000"
        X509v3 extensions:
            X509v3 Basic Constraints: critical
                CA:FALSE
            Netscape Comment: 
                Puppet Server Internal Certificate
            X509v3 Authority Key Identifier: 
                4D:A0:F5:23:FC:B6:4A:4E:7F:EF:39:6C:E0:7D:73:1A:AB:60:9F:E8
            X509v3 Extended Key Usage: critical
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Subject Key Identifier: 
                EE:43:BC:F1:6F:2C:A9:C5:62:26:42:BC:9D:21:B6:D1:D5:DA:9D:58
            1.3.6.1.4.1.34380.1.3.39: 
                ..true
            X509v3 Subject Alternative Name: 
                DNS:puppet, DNS:puppet

...


2024-01-16 14:33:39,574 INFO  [p.t.s.w.jetty9-core] Starting web server.
2024-01-16 14:33:39,589 INFO  [o.e.j.s.Server] jetty-9.4.53.v20231009; built: 2023-10-09T12:29:09.265Z; git: 27bde00a0b95a1d5bbee0eae7984f891d2d0f8c9; jvm 17.0.9+9-Ubuntu-122.04
2024-01-16 14:33:39,786 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@7cedcbc9{/puppet-ca,null,AVAILABLE}
2024-01-16 14:33:39,790 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@40ffcd92{/puppet-admin-api,null,AVAILABLE}
2024-01-16 14:33:39,855 INFO  [o.e.j.s.session] DefaultSessionIdManager workerName=node0
2024-01-16 14:33:39,856 INFO  [o.e.j.s.session] No SessionScavenger set, using defaults
2024-01-16 14:33:39,864 INFO  [o.e.j.s.session] node0 Scavenging every 600000ms
2024-01-16 14:33:39,994 INFO  [p.t.s.m.jolokia] Using policy access restrictor classpath:/jolokia-access.xml
2024-01-16 14:33:40,164 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.ServletContextHandler@79246c19{/metrics/v2,null,AVAILABLE}
2024-01-16 14:33:40,165 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@284daed8{/puppet,null,AVAILABLE}
2024-01-16 14:33:40,259 INFO  [o.e.j.u.s.SslContextFactory] x509=X509@ef88faa(private key,h=[puppet],a=[],w=[]) for InternalSslContextFactory@470d0fef[provider=null,keyStore=null,trustStore=null]
2024-01-16 14:33:40,528 INFO  [o.e.j.s.AbstractConnector] Started ServerConnector@49c9371c{SSL, (ssl, http/1.1)}{0.0.0.0:8140}
2024-01-16 14:33:40,529 INFO  [o.e.j.s.Server] Started @91746ms
2024-01-16 14:33:40,548 INFO  [p.t.s.s.status-core] Starting background monitoring of cpu usage metrics
2024-01-16 14:33:40,564 INFO  [p.t.s.s.status-service] Registering status callback function for service 'status-service', version 1.1.2
2024-01-16 14:33:40,566 INFO  [p.t.s.s.status-service] Registering status service HTTP API at /status
2024-01-16 14:33:40,601 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@2454e868{/status,null,AVAILABLE}
2024-01-16 14:33:40,662 INFO  [p.s.a.analytics-service] Puppet Server Update Service has successfully started and will run in the background
2024-01-16 14:33:40,674 INFO  [p.s.m.master-service] Puppet Server has successfully started and is now ready to handle requests
2024-01-16 14:55:03,325 INFO  [p.s.a.dropsonde] Successfully submitted module metrics via Dropsonde.

`

puppet agent config:

[main]
server = puppet.vpn.rv.ua
ca_server = puppet.vpn.rv.ua
environment = production
report = false
runinterval = 300
rundir = /var/run/puppet
factpath=$vardir/lib/facter
ssldir = /var/lib/puppet/ssl

[agent]
server = puppet.vpn.rv.ua

When a client tries to connect, I get an "unable to get issuer certificate" error.
logs on the client:

root@ip-172-31-1-176:~# puppet agent --verbose --onetime --no-daemonize --logdest console
Info: Creating a new SSL key for ip-172-31-1-176.us-east-2.compute.internal
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for ip-172-31-1-176.us-east-2.compute.internal
Info: Certificate Request fingerprint (SHA256): 85:DF:EA:7C:CB:28:80:36:E5:59:9A:9A:82:89:38:B1:44:0B:9C:C7:16:CF:1A:9F:22:2D:CC:50:3A:AE:D3:F0
Info: Caching certificate for ip-172-31-1-176.us-east-2.compute.internal
Error: request https://puppet.vpn.rv.ua:8140//puppet-ca/v1/certificate_revocation_list/ca failed: SSL_connect returned=1 errno=0 peeraddr=91.223.227.227:8140 state=error: certificate verify failed (unable to get issuer certificate)
Error: Could not request certificate: SSL_connect returned=1 errno=0 peeraddr=91.223.227.227:8140 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA generated on puppet.vpn.rv.ua at 2024-01-16 14:31:17 \+0000]
Exiting; failed to retrieve certificate and waitforcert is disabled

logs on the server at the same moment:

3.141.192.43 - - - 16/Jan/2024:15:25:22 +0000 "GET /puppet-ca/v1/certificate/ca?environment=production&fail_on_404=true HTTP/1.1" 200 2791 3.141.192.43 3.141.192.43 8140 91
3.141.192.43 - - - 16/Jan/2024:15:25:23 +0000 "GET /puppet-ca/v1/certificate/ip-172-31-1-176.us-east-2.compute.internal?environment=production& HTTP/1.1" 404 69 3.141.192.43 3.141.192.43 8140 12
3.141.192.43 - - - 16/Jan/2024:15:25:23 +0000 "GET /puppet-ca/v1/certificate_request/ip-172-31-1-176.us-east-2.compute.internal?environment=production& HTTP/1.1" 404 77 3.141.192.43 3.141.192.43 8140 17
2024-01-16 15:25:25,475 INFO  [p.p.certificate-authority] Entity CA signed 1 certificate: ip-172-31-1-176.us-east-2.compute.internal.
3.141.192.43 - - - 16/Jan/2024:15:25:25 +0000 "PUT /puppet-ca/v1/certificate_request/ip-172-31-1-176.us-east-2.compute.internal?environment=production& HTTP/1.1" 200 0 3.141.192.43 3.141.192.43 8140 1412
3.141.192.43 - - - 16/Jan/2024:15:25:25 +0000 "GET /puppet-ca/v1/certificate/ip-172-31-1-176.us-east-2.compute.internal?environment=production& HTTP/1.1" 200 1668 3.141.192.43 3.141.192.43 8140 20

The client is a fresh EC2 instance, x86_64, Ubuntu 22 LTS.
only puppet-agent is installed, and the server configuration is specified.

please, help, how to solve it ?
thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions