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

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.

主站蜘蛛池模板: 永康市| 营山县| 二连浩特市| 勐海县| 同德县| 上高县| 涞源县| 无为县| 屏边| 斗六市| 鱼台县| 临江市| 沙坪坝区| 嘉定区| 阳朔县| 永丰县| 镇远县| 抚远县| 满洲里市| 唐山市| 和平县| 衡阳市| 兴安县| 黔西县| 温州市| 广饶县| 左贡县| 萍乡市| 玛曲县| 铜陵市| 怀集县| 瓦房店市| 湛江市| 门源| 静宁县| 台中县| 辽阳县| 加查县| 靖江市| 涟源市| 嘉峪关市|