I'm setting up a puppet master and agent. They are running on the same host, as I want puppet to manage this host, too. The agent fails to find the convenient test module that the package provides.
I'm running ubuntu trusty (14.04 LTS) and installed packages puppetmaster-passenger and puppet to get going. All good so far.
root@mangosteen:/etc/puppet# dpkg -l | grep puppet
ii puppet 3.4.3-1ubuntu1.1 [...]
ii puppet-common 3.4.3-1ubuntu1.1 [...]
ii puppetmaster 3.4.3-1ubuntu1.1 [...]
ii puppetmaster-common 3.4.3-1ubuntu1.1 [...]
ii puppetmaster-passenger 3.4.3-1ubuntu1.1 [...]
root@mangosteen:/etc/puppet#
My /etc/puppet/puppet.conf
seems rather ordinary:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
dns_alt_names = mangosteen.example.com,puppetmaster.example.com
The package provides a quick test, which I think should mean that bringing up an agent will result in writing HelloWorld to /tmp/hello:
root@mangosteen:/etc/puppet# pwd
/etc/puppet
root@mangosteen:/etc/puppet# find manifests/ -type f
manifests/site.pp
root@mangosteen:/etc/puppet# find modules/ -type f
modules/test/manifests/init.pp
root@mangosteen:/etc/puppet# cat manifests/site.pp
include test
root@mangosteen:/etc/puppet# cat modules/test/manifests/init.pp
class test { file { \/tmp/hello\: content => \HelloWorld\ } }
root@mangosteen:/etc/puppet#
But this isn't what happens. (Recall that agent and master are on the same host, which is called mangosteen.example.com with alias puppetmaster.example.com)
root@mangosteen:/etc/puppet# puppet agent --test
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class test for mangosteen.example.com on node mangosteen.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
root@mangosteen:/etc/puppet#
The server log (/var/log/puppet/masterhttp.log
) is rather ordinary through that operation:
[2015-10-02 12:54:08] 139.162.x.y - - [02/Oct/2015:12:54:08 UTC] "GET /production/node/mangosteen.example.com? HTTP/1.1" 200 4487
[2015-10-02 12:54:08] - -> /production/node/mangosteen.example.com?
[2015-10-02 12:54:08] 139.162.x.y - - [02/Oct/2015:12:54:08 UTC] "GET /production/file_metadatas/plugins?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5 HTTP/1.1" 200 278
[2015-10-02 12:54:08] - -> /production/file_metadatas/plugins?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5
[2015-10-02 12:54:09] 139.162.x.y - - [02/Oct/2015:12:54:09 UTC] "POST /production/catalog/mangosteen.example.com HTTP/1.1" 400 89
[2015-10-02 12:54:09] - -> /production/catalog/mangosteen.example.com
[2015-10-02 12:54:09] 139.162.x.y - - [02/Oct/2015:12:54:09 UTC] "PUT /production/report/mangosteen.example.com HTTP/1.1" 200 9
[2015-10-02 12:54:09] - -> /production/report/mangosteen.example.com
And debug output from the agent is uninteresting to my eye, mostly about finding its certs. These commands provide a reasonable summary of that boredom:
root@mangosteen:/etc/puppet# puppet agent --test --debug --trace 2>&1 | grep -i module
root@mangosteen:/etc/puppet# puppet agent --test --debug --trace 2>&1 | grep -i test
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class test for mangosteen.example.com on node mangosteen.example.com
root@mangosteen:/etc/puppet#
Any pointers on what I'm doing wrong?