puppetmasterd verbose log

353 views
Skip to first unread message

Sergey V. Arlashin

unread,
Jan 27, 2011, 7:17:20 PM1/27/11
to puppet...@googlegroups.com
Hi!
When I issue
$ puppetmasterd --no-daemonize --verbose

I get very neat and clear log to STDIN. But I can't figure out how to
get this log when I start puppetmasterd without --no-daemonize option.
Is it possible?

Daniel Pittman

unread,
Jan 27, 2011, 7:25:23 PM1/27/11
to puppet...@googlegroups.com

To STDOUT? You can pass '--logdest console' to override the default,
which is that we log to syslog if you are daemonized, and to the
console if not.

The effect of '--verbose' is independent of where the logs are sent,
though, so you will get the same data to whatever log destination is
configured.

Regards,
Daniel
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

John Warburton

unread,
Jan 27, 2011, 7:43:38 PM1/27/11
to puppet...@googlegroups.com
You can log to a file with logdest - but doesn't buffer correctly. Watch https://projects.puppetlabs.com/issues/4139

John

Romain Pelisse

unread,
Jan 27, 2011, 8:14:49 PM1/27/11
to puppet...@googlegroups.com
On this topic, I was searching earlier how to add the --verbose to the puppet.conf, so that when puppet is running as a service the log in /var/log/puppet are more verbosy... 


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.



--
Romain PELISSE,
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it" -- Terry Pratchett
http://belaran.eu/wordpress/belaran

Patrick

unread,
Jan 28, 2011, 12:18:54 AM1/28/11
to puppet...@googlegroups.com
I think you can just add "verbose=true" in the master section of /etc/puppet/puppet.conf

Romain Pelisse

unread,
Jan 28, 2011, 5:54:45 AM1/28/11
to puppet...@googlegroups.com
Well, this was my assumption. I did so, but no messages end up in /var/log/puppet/ (as configured in the puppet.conf), which I find weird because my puppet is currently unable to connect to the puppetmaster ! So it should fill the log with a failure every half an hour...

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Felix Frank

unread,
Jan 28, 2011, 6:50:44 AM1/28/11
to puppet...@googlegroups.com, Romain Pelisse
On 01/28/2011 11:54 AM, Romain Pelisse wrote:
> Well, this was my assumption. I did so, but no messages end up in
> /var/log/puppet/ (as configured in the puppet.conf), which I find weird
> because my puppet is currently unable to connect to the puppetmaster !
> So it should fill the log with a failure every half an hour...

If the error hits you before a connection is made, the puppet master
wouldn't notice there is anything to log.

In such circumstances, I prefer launching an undaemonized master on a
different port and connecting to that from the client's commandline.

What's the error reported by the client?

Regards,
Felix

Romain Pelisse

unread,
Jan 28, 2011, 8:07:19 AM1/28/11
to Felix Frank, puppet...@googlegroups.com
Oh, sorry, actually there is no error. The puppetmaster is not running yet. I just wanted to check out a little bit what the log would like like. However, I found that strange that if puppet can't connect to the puppetmaster, there is no complaint (in a log) about it...

Felix Frank

unread,
Jan 28, 2011, 8:18:37 AM1/28/11
to puppet...@googlegroups.com, Romain Pelisse
On 01/28/2011 02:07 PM, Romain Pelisse wrote:
> Oh, sorry, actually there is no error. The puppetmaster is not running
> yet. I just wanted to check out a little bit what the log would like
> like. However, I found that strange that if puppet can't connect to the
> puppetmaster, there is no complaint (in a log) about it...

I don't comprehend at all. Which process do you expect to log an error
each half hour?

If the master is not running, it is only logical that the client cannot
connect and that the master (not running) cannot log an error.

I guess I'm misunderstanding this.

Romain Pelisse

unread,
Jan 28, 2011, 8:36:56 AM1/28/11
to Felix Frank, puppet...@googlegroups.com
I'm not making myself very clear also :)    (as you are also in Berlin, you can realize my first question was rather late in the night ;) )

I do apologize. Here is an hopefully enlightening snippet:

$ grep -e 'server' /etc/puppet/puppet.conf
server = puppetmaster
$ ping puppetmaster
(host down)
# service puppet start
...

So at this point the puppet client will not be able to connect, throwing something like that if run with --no-daemonize and --verbose :

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

Now, I was expecting to find those messages inside the /var/log/puppet/ folder, as I expected the clients to "check on" the master every 30 minutes... But, I'm starting to think I'm getting this wrong ? Maybe the puppetmaster is "pushing" to puppets every 30 minutes ? 

On 28 January 2011 14:18, Felix Frank <f...@mpexnet.de> wrote:
On 01/28/2011 02:07 PM, Romain Pelisse wrote:
> Oh, sorry, actually there is no error. The puppetmaster is not running
> yet. I just wanted to check out a little bit what the log would like
> like. However, I found that strange that if puppet can't connect to the
> puppetmaster, there is no complaint (in a log) about it...

I don't comprehend at all. Which process do you expect to log an error
each half hour?

If the master is not running, it is only logical that the client cannot
connect and that the master (not running) cannot log an error.

I guess I'm misunderstanding this.

Felix Frank

unread,
Jan 28, 2011, 8:42:57 AM1/28/11
to puppet...@googlegroups.com
On 01/28/2011 02:36 PM, Romain Pelisse wrote:
> I'm not making myself very clear also :) (as you are also in Berlin,
> you can realize my first question was rather late in the night ;) )
>
> I do apologize. Here is an hopefully enlightening snippet:
>
> $ grep -e 'server' /etc/puppet/puppet.conf
> server = puppetmaster
> $ ping puppetmaster
> (host down)
> # service puppet start
> ...
>
> So at this point the puppet client will not be able to connect, throwing
> something like that if run with --no-daemonize and --verbose :
>
> 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
>
> Now, I was expecting to find those messages inside the /var/log/puppet/
> folder, as I expected the clients to "check on" the master every 30
> minutes... But, I'm starting to think I'm getting this wrong ? Maybe the
> puppetmaster is "pushing" to puppets every 30 minutes ?

No, the clients are supposed to pull.

What client version is this? I've seen 0.24.5 clients crash when the
master went down, and seen 0.25.5 clients end up in a (apparent) sort of
deadlock. No further logging in either scenario.

I haven't tried 2.6 yet.

You're right, though. The expected result would be a client log entry
every half hour.

Cheers,
Felix

Romain Pelisse

unread,
Jan 28, 2011, 8:52:31 AM1/28/11
to puppet...@googlegroups.com
No, the clients are supposed to pull.

What client version is this? I've seen 0.24.5 clients crash when the
master went down, and seen 0.25.5 clients end up in a (apparent) sort of
deadlock. No further logging in either scenario.

I haven't tried 2.6 yet.

0.25.5, lastest available for Fedora (well, actually I'm running with
CentOS with RPM from Fedora)
# puppetd --version
0.25.5 You're right, though. The expected result would be a client log entry
every half hour.


Ok, this is confirmation is actually really helpful (I now know
something is wrong and I know my premise not).

--
Romain PELISSE,
"The trouble with having an open mind, of course, is that people will
insist on coming along and trying to put things in it" -- Terry
Pratchett
http://belaran.eu/wordpress/belaran


--
Romain PELISSE,
*"The trouble with having an open mind, of course, is that people will
insist on coming along and trying to put things in it" -- Terry Pratchett*
http://belaran.eu/wordpress/belaran

Romain Pelisse

unread,
Jan 28, 2011, 10:55:55 AM1/28/11
to puppet...@googlegroups.com
Ok, I found why : messages are going to /var/log/messages, not the /var/log/puppet folders...

Daniel Pittman

unread,
Jan 28, 2011, 11:47:01 AM1/28/11
to puppet...@googlegroups.com

On Jan 28, 2011 7:56 AM, "Romain Pelisse" <bel...@gmail.com> wrote:
>
> Ok, I found why : messages are going to /var/log/messages, not the /var/log/puppet folders...

Oh, good. Y'all found the reason. Pupput pretty uniformly defaults our logs to the console in interactive runs, and syslog if we daemonize.

You can change that, including the syslog facility, or to use a file, on the command line or equivalently (because all options work that way) in the config files.

Regards,
    Daniel
--
Puppet Labs Developer –http://puppetlabs.com
Daniel Pittman <dan...@puppetlabs.com>
Contact me via gtalk, email, or phone: +1 (877) 575-9775

Sent from a mobile device. Please forgive me if this is briefer than usual.

Reply all
Reply to author
Forward
0 new messages