puppetserver ca commands fail connecting to https://puppet:8140 when using srv record解决方法

puppetserver ca commands fail connecting to https://puppet:8140 when using SRV record solution

我在我的木偶架构中使用 SRV 解决方案。尝试设置新的 Puppet Master 和 CA 并查看我的证书时出现此错误:

puppetserver ca list --all
Fatal error when running action 'list'
  Error: Failed connecting to https://puppet:8140/puppet-ca/v1/certificate_statuses/any_key
  Root cause: Failed to open TCP connection to puppet:8140 (getaddrinfo: No address associated with hostname)

我的 puppet.conf 文件具有以下配置:

   use_srv_records = true
   srv_domain = mypuppetrecord.com

我错过了什么?

我设法在这里找到了解决方案。我需要将以下内容添加到我的 /etc/hosts 文件中:

xxx.xx.xx.xx(主机IP)puppet