Ask Your Question

Puppet agent hangs after the run is finished

asked 2014-04-24 09:55:02 -0500

PorkCharSui gravatar image

updated 2014-04-25 03:19:34 -0500

When I do a puppet run, it works normally until the very end. This is what it looks like:

<snip the entire error-less run>
Debug: Finishing transaction 21894520
Debug: Storing state
Debug: Stored state in 0.10 seconds
Notice: Finished catalog run in 1.81 seconds

And then it takes about a minute before I get my prompt again.

I've tried running:

puppet agent --debug --summarize --evaltrace --trace -t

That was useless however, since there aren't any problems during the run, but only after. So no info there.

I did:

# strace -e trace=file puppet agent -t
open("/etc/puppet/ssl/certs/ca.pem", O_RDONLY) = 7
open("/etc/puppet/ssl/certs/ca.pem", O_RDONLY) = 7
<hangs here>
stat("/etc/puppet/ssl/certs/<fqdn_my_system>.pem", {st_mode=S_IFREG|0644, st_size=1923, ...}) = 0
stat("/etc/puppet/ssl/certs/ca.pem", {st_mode=S_IFREG|0644, st_size=1891, ...}) = 0

then returns the prompt. And...:

# strace -e trace=network puppet agent -t
connect(6, {sa_family=AF_INET, sin_port=htons(8140), sin_addr=inet_addr("<puppetmaster_ip>")}, 16) = 0
<hangs here>

and then returns the prompt. The above line appears several times in the trace, but doesn't hang on any of them, only the last one.

I can't find any errors in the logs on the puppetmaster or the agent machine. It just hangs and after a while returns my prompt. Can anyone tell where I could look, or what I can do next to figure this out? I'm kinda out of ideas atm, any suggestions would be appreciated.


The output of "puppet agent --debug --summarize --evaltrace --trace -t" with an empty catalog:

<snip a lot of spam without errors>
Debug: Finishing transaction 69820645777420
Debug: Storing state
Debug: Stored state in 0.08 seconds
Notice: Finished catalog run in 0.11 seconds
            Total: 8
       Filebucket: 0.00
         Schedule: 0.00
   Config retrieval: 0.59
            Total: 0.59
         Last run: 1398413331
           Config: 1398413331
           Puppet: 3.5.1
<hangs for about a minute and I get my prompt back>
edit retag flag offensive close merge delete


Does the manifest have any exec's ? Perhaps the exec is timing out.

spuder gravatar imagespuder ( 2014-04-24 12:21:39 -0500 )edit

Nope... no exec's in the manifest. And it doesn't matter what I put in the manifest. It happens on every puppet run, on every system, with every catalog (even an empty one). It happens after the run is completely finished, then it decides to hang, as if waiting for something to respond.

PorkCharSui gravatar imagePorkCharSui ( 2014-04-25 03:10:32 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2015-01-23 08:29:57 -0500

PorkCharSui gravatar image

Never figured out what this was, but it's gone.

edit flag offensive delete link more

answered 2014-04-25 05:00:19 -0500

t0m gravatar image

This delay will be creating (and POSTing) the report of what was done in the puppet run. If you have a large catalog then this is non-trivially expensive.

You can disable sending reports if you're not using them.

edit flag offensive delete link more


It happens on an empty catalog, so I don't think it's the report. And even if it was... a minute?! Thats way too long for creating any report!

PorkCharSui gravatar imagePorkCharSui ( 2014-04-28 03:07:27 -0500 )edit

How to disable it? [agent]\nreport = false does not seem to help.

Sebastian gravatar imageSebastian ( 2017-01-24 10:16:55 -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: 2014-04-24 09:55:02 -0500

Seen: 1,904 times

Last updated: Jan 23 '15