I'm getting started with puppet on ec2 using the following guide.
https://help.ubuntu.com/12.04/serverguide/puppet.html
In the very last step when I try to sign the puppet client from the puppet master I get the following error
root@ip-10-248-27-66:/home/ubuntu# puppetca --sign ec2-54-245-56-210.us-west-2.compute.amazonaws.com
err: Could not call sign: Could not find certificate request for ec2-54-245-56-210.us-west-2.compute.amazonaws.com
Here is the output of /etc/hosts
on the puppetmaster
127.0.0.1 localhost puppetmaster
10.248.34.162 ec2-54-245-56-210.us-west-2.compute.amazonaws.com puppet
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Here is the output of /etc/hosts
on the puppet client
127.0.0.1 localhost
10.248.27.66 ec2-50-112-220-110.us-west-2.compute.amazonaws.com puppetmaster
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I followed the troubleshooting advice here https://serverfault.com/a/388973/85577
Is the master running?
root@ip-10-248-27-66:/home/ubuntu# service puppetmaster status
* master is running
Does the hostname 'puppet' or 'puppet.abc.com' resolve from the agent?
How would I check this? Do I simply telnet to puppetmaster
on port 8140 (the host command does not resolve it but the telnet command does)?
root@ip-10-248-34-162:/home/ubuntu# host puppetmaster
Host puppetmaster not found: 3(NXDOMAIN)
Is TCP port 8140 on the master reachable from the agent (try: telnet puppet 8140)?
root@ip-10-248-34-162:/home/ubuntu# telnet puppetmaster 8140
Trying 10.248.27.66...
Connected to ec2-50-112-220-110.us-west-2.compute.amazonaws.com.
Escape character is '^]'.
What does syslog on the agent say?
Apr 11 17:57:41 ip-10-248-34-162 puppet-agent[3897]: Could not request certificate: getaddrinfo: Name or service not known
Try puppet agent --test on the agent, which will attempt to connect to the master and stay in foreground to show the output.
root@ip-10-248-34-162:/home/ubuntu# puppet agent --test
err: Could not request certificate: getaddrinfo: Name or service not known
Exiting; failed to retrieve certificate and waitforcert is disabled
EDIT
Thanks dawud so the entries in /etc/hosts
are correct per this command
$ getent hosts puppetmaster
10.248.27.66 ec2-50-112-220-110.us-west-2.compute.amazonaws.com puppetmaster
however when I try this I get an error
$ puppet agent --test --waitforcert 5
err: Could not request certificate: Connection refused - connect(2)
err: Could not request certificate: Connection refused - connect(2)