You are specifying the name of the Puppet master when you use --server but that's not how the agent will usually run. The error you're getting with the puppet agent -t indicates a problem communicating with the master. That's going to behave the same as when the agent runs every 30 minutes.
I would check to make sure that the agent has the correct master listed in its puppet.conf file, and also that you can resolve that master's name from the agent host. There's a bit of additional troubleshooting info in this doc: http://docs.puppetlabs.com/puppet/4.2/reference/quick_start_master_agent_communication.html Rich On Thu, Oct 8, 2015 at 11:56 PM Wei Chen <chenwei2...@gmail.com> wrote: > Hi John, > > Thanks for your answer first. > > I am new comer of puppet. I just wrote some simple code as follow: > > The 'site.pp' on the server side: > > import 'nodes.pp' > $puppetmaster = 's001ap38-test' > > > The 'init.pp' on the server side: > class httpd { > package { "httpd": > ensure => present, > } > > file { "/etc/httpd/conf.d/s001is35-test.conf": > owner => "root", > group => "root", > mode => 0666, > source => "puppet:///modules/httpd/s001is35-test.conf", > require => Package["httpd"], > } > } > > > The 'nodes.pp' on the server side: > > node 's001is35-test' { > include httpd > } > > > I ran the agent with following command: > > puppet agent --server s001ap38-test --no-daemonize --verbose --onetime > > The file 's001is35-test.conf' is coped from the server to agent. But since > I used the option '--onetime', the agent is stopped after this. I think > this is the reason why the copied file on the agent side, which I've > changed it, is not recovered after 30 min. > > > Then I try to run the agent manually with 'puppet agent -t' as you told. > But I got error as follow: > ... > ]# puppet agent -t > err: Could not retrieve catalog from remote server: getaddrinfo: Name or > service not known > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > err: Could not send report: getaddrinfo: Name or service not known > ... > > Then I simply run the agent with: > puppet agent > > The agent is ran as a daemon. > > But 30 min later, the file is not recovered yet. > > > Any suggestion? > > > Wei > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/dbd18b91-3d8e-43e5-b22a-51250c5b9c52%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/dbd18b91-3d8e-43e5-b22a-51250c5b9c52%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPGcbtB9eB2ZmiOvSP0g7XWDE8%2BFwXgBVd5ivhKXVmPbsSREPQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.