puppet agent restarting everyday?

113 views
Skip to first unread message

Suresh P

unread,
Dec 12, 2014, 12:17:55 PM12/12/14
to puppet...@googlegroups.com
Hi,

Why puppet agent restarting everyday at 00:01 hours?  

[2014-11-29 00:01:02] INFO  WEBrick::HTTPServer#start: pid=31285 port=8139
[2014-11-30 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-11-30 00:01:02] INFO  WEBrick::HTTPServer#start: pid=13866 port=8139
[2014-12-01 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-01 00:01:02] INFO  WEBrick::HTTPServer#start: pid=28813 port=8139
[2014-12-02 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-02 00:01:02] INFO  WEBrick::HTTPServer#start: pid=11383 port=8139
[2014-12-03 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-03 00:01:02] INFO  WEBrick::HTTPServer#start: pid=26301 port=8139
[2014-12-04 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-04 00:01:02] INFO  WEBrick::HTTPServer#start: pid=8863 port=8139
[2014-12-05 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-05 00:01:02] INFO  WEBrick::HTTPServer#start: pid=23908 port=8139
[2014-12-06 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-06 00:01:02] INFO  WEBrick::HTTPServer#start: pid=6618 port=8139
[2014-12-07 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-07 00:01:02] INFO  WEBrick::HTTPServer#start: pid=21677 port=8139
[2014-12-08 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-08 00:01:02] INFO  WEBrick::HTTPServer#start: pid=4326 port=8139
[2014-12-09 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-09 00:01:02] INFO  WEBrick::HTTPServer#start: pid=19402 port=8139
[2014-12-10 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-10 00:01:02] INFO  WEBrick::HTTPServer#start: pid=2205 port=8139
[2014-12-11 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-11 00:01:03] INFO  WEBrick::HTTPServer#start: pid=17460 port=8139
[2014-12-12 00:01:01] INFO  WEBrick::HTTPServer#start done.
[2014-12-12 00:01:02] INFO  WEBrick::HTTPServer#start: pid=1594 port=8139

Regards,
Suresh

Dirk Heinrichs

unread,
Dec 12, 2014, 1:37:47 PM12/12/14
to puppet...@googlegroups.com
Am 12.12.2014 um 13:17 schrieb Suresh P:

Why puppet agent restarting everyday at 00:01 hours?  

[2014-11-29 00:01:02] INFO  WEBrick::HTTPServer#start: pid=31285 port=8139
[2014-11-30 00:01:01] INFO  WEBrick::HTTPServer#start done.

That's not the agent, it's the master. Logrotate cronjob (/etc/cron.daily)?

HTH...

    Dirk
--

Dirk Heinrichs, Senior Systems Engineer, Engineering Solutions
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Tel: +49 2226 1596666 (Ansage) 1149
Email: d...@recommind.com
Skype: dirk.heinrichs.recommind
www.recommind.com

Felix Frank

unread,
Dec 15, 2014, 1:32:14 PM12/15/14
to puppet...@googlegroups.com
On 12/12/2014 02:37 PM, Dirk Heinrichs wrote:
>> Why puppet agent restarting everyday at 00:01 hours?
>>
>> [2014-11-29 00:01:02] INFO WEBrick::HTTPServer#start: pid=31285 port=8139
>> [2014-11-30 00:01:01] INFO WEBrick::HTTPServer#start done.
>
> That's not the agent, it's the master. Logrotate cronjob (/etc/cron.daily)?

I'm not entirely convinced that an agent with the listen option would
not start a WEBrick server as well.

But yes, logrotation and friends are a likely suspect.

Cheers,
Felix

Suresh P

unread,
Dec 16, 2014, 2:26:26 PM12/16/14
to puppet...@googlegroups.com
Hi,

This is configured to run daily by puppet installation itself.   Does this restart puppet agent?

/var/log/puppet/*log {
  missingok
  notifempty
  create 0644 puppet puppet
  sharedscripts
  postrotate
  pkill -USR2 -u puppet -f 'puppet master' || true
  [ -e /etc/init.d/puppet ] && /etc/init.d/puppet reload > /dev/null 2>&1 || true
  endscript
}

-Suresh

Dirk Heinrichs

unread,
Dec 16, 2014, 2:40:21 PM12/16/14
to puppet...@googlegroups.com
Am 16.12.2014 um 15:26 schrieb Suresh P:

This is configured to run daily by puppet installation itself.   Does this restart puppet agent?

/var/log/puppet/*log {
  missingok
  notifempty
  create 0644 puppet puppet
  sharedscripts
  postrotate
  pkill -USR2 -u puppet -f 'puppet master' || true
  [ -e /etc/init.d/puppet ] && /etc/init.d/puppet reload > /dev/null 2>&1 || true
  endscript
}

Yes, it does, although it shouldn't. "/etc/init.d/puppet reload" sends a SIGHUP signal to the puppet agent, which restarts it. However, according to puppet-agent(8), this action should better be sending a SIGUSR2 ("Close file descriptors for log files and reopen them. Used with logrotate."), which wouldn't trigger an agent restart.

Should this be considered a bug in /etc/init.d/puppet?

Bye...

Suresh P

unread,
Dec 18, 2014, 12:28:51 PM12/18/14
to puppet...@googlegroups.com, d...@recommind.com
Becase of this restart.   My 1200 puppet agent runtime changed and so all 1200 puppet agents try to connect puppetmasters at same time because of this most of the agent in out-of-sync or error stat.

Regards,
Suresh.
Reply all
Reply to author
Forward
0 new messages