wazuh-documentation icon indicating copy to clipboard operation
wazuh-documentation copied to clipboard

Puppet configuration fails due to bad certificate name. Add troubleshooting section

Open MiguelazoDS opened this issue 4 months ago • 0 comments

Description

During the test in https://github.com/wazuh/wazuh/issues/26404 it was found a case where the agent name has a trailing dot "." which prevents the configuration from succeeding.

It would be nice to add a troubleshooting section explaining the procedure below, in case a user faces the same inconvenient.

[root@al2023-2 vagrant]# puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: Requesting catalog from puppet-master:8140 (192.168.33.191)
Notice: Catalog compiled by jammy.fibertel.com.ar
Error: Could not retrieve catalog from remote server: Error 403 on SERVER: Forbidden request: /puppet/v3/catalog/al2023-2. (method :post). Please see the server logs for details.
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Error 403 on SERVER: Forbidden request: /puppet/v3/report/al2023-2. (method :put). Please see the server logs for details.

The issue is the trailing "." in the request not matching the rule in Puppet Server.

The solution is to configure a the certificate name without that trailing dot.

[main]
server = puppet-master
certname = al2023-2

After that

[root@al2023-2 vagrant]# puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: Requesting catalog from puppet-master:8140 (192.168.33.191)
Notice: Catalog compiled by jammy.fibertel.com.ar
Info: Caching catalog for al2023-2
Info: Applying configuration version '1729609896'
Notice: Applied catalog in 0.01 seconds

MiguelazoDS avatar Oct 22 '24 15:10 MiguelazoDS