Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
I am getting this error while executing the below command
[[email protected] /]# puppetserver ca list 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: Name or service not known)
You need to add the public IP of your puppet master instance in both master and slave instances. Execute the below command in both the instances,
sudo nano /etc/hosts
Add the public IP of your master instance and puppetserver name. For example,
Change the public IP as per your instance.