简体   繁体   中英

Agent not reading /etc/sysconfig/puppet server=

We have several servers working with puppet as agents today, but I'm having a problem with a new server running CentOS 7. Normally I would update the /etc/sysconfig/puppet file with the puppet master name and then start the daemon and move to signing the certificate on the master. However, puppet agent doesn't appear to be reading the server = myhost.domain in my config file. I get the following error in /var/log/messages :

puppet-agent[11133]: Could not request certificate: getaddrinfo: Name or service not known

I tried:

myserver:root$ puppet agent --configprint server
puppet
myserver:root$

but the /etc/sysconfig/puppet file has:

PUPPET_SERVER=myserver.domain.com

Can you please help me understand why puppet agent doesn't get the server from the config file?

The /etc/sysconfig/puppet file is not typically read by the Puppet agent. (I'm not very familiar with CentOS operations, but I suppose that this location might hold some settings that are external to the process, such as environment, command line switches etc.)

You will want to use the proper puppet configuration file:

  • /etc/puppet/puppet.conf for Puppet 3.x and earlier
  • /etc/puppetlabs/puppet.conf for Puppet 4.x

so ran the following:

"puppet agent --no-daemonize --verbose --onetime --server puppetmaster.xxx.com"

this started puppet properly, requested certificate and I was able to sign on master. Then added:

server = puppetmaster.xxx.com

to /etc/puppet/puppet.conf and "systemctl restart puppet"

and it worked. Thanks for posts here and other places.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM