Ask Your Question
0

sudo apt-get update change config files for puppet?

asked 2014-10-28 21:16:48 -0500

jimsonpai gravatar image

I booted up 3 vm in linuxmint. 1 puppetmaster and 2 puppet. 2 days ago I could run "sudo puppet agent --test" in both of the client without a problem. Today I was installing meteor in one of my puppet. Afterwards"sudo puppet agent --test" no longer works. I am extremely perplex by this phenomenon. That is because I did not touch any .conf nor .pp in the past few days. As a matter of fact, I simply turn the vm off for 2 days and turn it on today. I am unable to diagnose the problem that's causing this error. I would appreciate if someone can give me an explanation and how to fix it.

Error log:

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain Could not retrieve file metadata for puppet://puppetmaster/plugins: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Error: Could not retrieve catalog from remote server: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-06-09 09:54:40 -0500

Goran40 gravatar image

I have same problem on fresh new installed puppet master .. here is the puppet.config file from master

=================

[main]

# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
# Set up DNS names that server will respond to
dns_alt_names = puppet.mylocaldomain.local

[master]

# Tell puppet where the env directory is
environmentpath = $confdir/environments
basemodulepath = $confdir/modules:/opt/puppet/share/modules
# Configure puppet to talk to the puppet dashboard
reports = store, http
reporturl = http://puppet.mylocaldomain:3000/reports/upload
node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://puppet.mylocaldomain.local:3000 /usr/share/puppet-dashboard/bin/external_node
always_cache_features = true

[agent]

# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
# Turn on reporting
 report = true

========================

edit flag offensive delete link more
0

answered 2014-10-29 07:31:17 -0500

rnelson0 gravatar image

There are a variety of causes, but it looks to be some mismatch between the name in the certificate generated by the master and the hostname of the server now. Perhaps between when you generated the certificate and rebooted, the hostname had been changed, as hostname changes sometimes do not take affect until after a reboot.

Try the steps listed at https://docs.puppetlabs.com/guides/tr... to determine the fix. It may be as simple as setting the certname value in /etc/puppet/conf and restarting the master.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-28 21:16:48 -0500

Seen: 529 times

Last updated: Jun 09 '15