err: Could not retrieve catalog from remote server indicates that the puppet agent was unable to contact the puppetmaster.
Ensure the puppet agent is configured with the puppetmaster's hostname or fully qualified domain name.
/etc/puppetlabs/puppet/puppet.conf and in section
[main], confirm the value of
server is correct.
certname = puppetmaster01.example.com
server = puppet
environment = production
runinterval = 1h
strict_variables = true
In the above example the server name
puppet must be the address of the puppetmaster.
See the puppetlabs configuration documentation https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
Second, ensure the puppetmaster's hostname or fully qualified domain name resolves to an IP address. Fix your DNS if it does not resolve.
dig or another tool to ensure the name resolves correctly:
Lastly, check the firewall on the puppetmaster. Ensure all the required ports are allowed in the firewall configuration as specified in the documentation https://docs.puppetlabs.com/pe/latest/install_system_requirements.html
- 8140 The Puppet master uses this port to accept inbound
traffic/requests from Puppet agents. The PE console sends request to
the Puppet master on this port. Certificate requests are passed over
this port unless ca_port is set differently. Classifier group: “PE
- 443 This port provides host access to the PE console. The PE
Console accepts HTTPS traffic from end-users on this port. Classifier
group: “PE Console”
- 61613 MCollective uses this port to accept inbound
traffic/requests from Puppet agents. Any host used to invoke
commands must be able to reach MCollective on this port. Classifier
group: “PE ActiveMQ Broker”
- 8142 Orchestration services uses this port to accept inbound
traffic/requests from Puppet agents. Classifier group: “PE