Ask Your Question

Puppet agent not pulling files from server

asked 2016-02-04 07:00:28 -0500

sayan gravatar image

updated 2016-02-05 04:33:01 -0500

I've installed puppet master/agent on separate [fedora 23] vms. The selinux issues are taken care of, so server and agent can talk to each other. I'm facing some strange issue which prevents the agent from pulling a file from server. My site.pp on server looks as follows:

node default {

file { "/tmp/":
        mode   => '777',
        source => "puppet:///extra_files/"

file { "/tmp/":
        mode   => '777',
        source => "puppet:///extra_files/"

exec { 'start':
    command => "/bin/bash -c '/tmp/'",
    subscribe => File["/tmp/"],
    refreshonly => true

If I execute the following command on server, it's working as it should.

puppet apply /etc/puppet/manifests/site.pp

But if I run the agent using the following command I don't see anything on agent's /tmp, nor do I see any error.

puppet agent --test --debug

My fileserver.conf looks as follows:

path /etc/puppet/files
allow *

Update: If I change my site.pp to some random junk then also puppet agent not throwing any error. Output from puppet agent ends with:

Info: Caching catalog for fedoraclient.localdomain
Debug: Creating default schedules
Debug: Loaded state in 0.00 seconds
Info: Applying configuration version '1454685403'
Debug: Finishing transaction 47031122831220
Debug: Storing state
Debug: Stored state in 0.00 seconds
Notice: Applied catalog in 0.02 seconds
Debug: Using cached connection for https://fedoramaster.localdomain:8140
Debug: Caching connection for https://fedoramaster.localdomain:8140
Debug: Closing connection for https://fedoramaster.localdomain:8140

I don't know if it's relevant but my /var/log/puppet/masterhttp.log shows the following error

ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv2/v3 read client hello A
/usr/share/ruby/vendor_ruby/puppet/network/http/webrick.rb:32:in `accept'
/usr/share/ruby/vendor_ruby/puppet/network/http/webrick.rb:32:in `block (2 levels) in listen'
/usr/share/ruby/webrick/server.rb:294:in `call'
/usr/share/ruby/webrick/server.rb:294:in `block in start_thread'
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-02-05 12:06:43 -0500

mikachewie gravatar image

updated 2016-02-05 12:08:49 -0500

For trouble shooting purposes, add an ensure statement. If it cannot create the file, it should throw an error that might help narrow things down. Essentially, you need the ensure portion of the code because without it, you cannot use the source attribute properly;

"file will make sure it’s a normal file, and enables use of the content or source attribute."

file { "/tmp/":
        ensure => file,
        mode   => '777',
        source => "puppet:///extra_files/"

file { "/tmp/":
        ensure => file,
        mode   => '777',
        source => "puppet:///extra_files/"
edit flag offensive delete link more


Nothing new happens, I get the same output. I've tried using elasticsearch-logstash plugin also, but now I'm sure the agent is not even reading the content of site.pp

sayan gravatar imagesayan ( 2016-02-08 01:15:37 -0500 )edit

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


Asked: 2016-02-04 07:00:28 -0500

Seen: 187 times

Last updated: Feb 05 '16