官术网_书友最值得收藏!

Troubleshooting SSL issues

Among the most frustrating issues, especially for new users, are problems with the agent's SSL handshake. Such errors are especially troublesome because Puppet cannot always offer very helpful analysis in its logs—the problems occur in the SSL library functions, and the application cannot examine the circumstances.

Note

The online documentation at Puppet Labs has a Troubleshooting section that has some advice concerning SSL-related issues as well at https://docs.puppetlabs.com/guides/troubleshooting.html.

Consider the following output for the --test command:

root@agent# puppet agent --testWarning: Unable to fetch my node definition, but the agent run will continue:
Warning: SSL_connect returned=1 errno=0 state=unknown state: certificate verify failed: [CRL is not yet valid for /CN=Puppet CA: puppet.example.net]

The agent opines that the CRL it receives from the master is not yet valid. Errors such as these can happen whenever the agent's clock gets reset to a very early date. This can also result from but a slight clock skew, when the CRL has recently been updated through a revocation action on the master. If the system clock on the agent machine returns a time far in the future, it will consider certificates to be expired.

These clock-related issues are best avoided by running an ntp service on all Puppet agents and masters.

Errors will generally result if the data in the agent's $ssldir becomes inconsistent. This can happen when the agent interacts with an alternate master (a testing instance, for example). The first piece of advice you will most likely receive when asking the community what to do about such problems is to create a new agent certificate from scratch. This works as described in the The agent's life cycle section:

Note

Before you start the recovery procedure, make sure that you are logged in to the afflicted agent machine and not the master. Losing the master's SSL data will make it necessary to recreate your complete SSL infrastructure.

  1. Remove all the SSL data from the agent machine.
  2. Revoke and remove the certificate from the master using puppet cert clean.
  3. Request and sign a new certificate.

This approach will indeed remedy most issues. Be careful not to leave any old files in the relevant location on the agent machine. If the problems persist, a more involved solution is required. The openssl command-line tool is helpful to analyze the certificates and related files. The details of such an analysis are beyond the scope of this book, though.

主站蜘蛛池模板: 江孜县| 临颍县| 无极县| 富顺县| 南靖县| 三门县| 靖宇县| 涞水县| 广元市| 山阴县| 南木林县| 佛冈县| 大安市| 简阳市| 新营市| 封丘县| 汉阴县| 湘潭县| 涿州市| 政和县| 天峻县| 杭州市| 修武县| 金乡县| 麻城市| 雷波县| 岗巴县| 嘉峪关市| 满洲里市| 肥城市| 济源市| 寿光市| 昌宁县| 伊通| 晋中市| 寻甸| 永年县| 元江| 丹寨县| 金乡县| 清徐县|