0

I have been running puppet master and agent in a same node. While master works correctly, it seems the agent is not logging. I checked the /var/log/puppet folder and rsyslog, but they have nothing about the agent. I am using the following configuration:

[main]    
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server=name_of_the_server

[master]

# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

I have other nodes with only the agent that are logging correctly. Any ideas of what could be causing this?

Thanks in advance!

EGS
  • 409
  • 4
  • 23
  • Try addind "[main]" in the beging of your conf file. I think that should help. – Gilad Sharaby Sep 17 '16 at 17:35
  • Actualy, it has the [main] tag. I just forgot to put here. I'm going correct. – EGS Sep 20 '16 at 10:12
  • I was thinking that if there is a way to debug the puppet run , I could trace the steps it takes and then compare with the nodes that are logging and then search where they differ. So I started to run puppet agent -t --noop --verbose --debug, but couldn't find anything useful. Does someone have another sugestion to investigate this issue? – EGS Sep 21 '16 at 12:43

1 Answers1

0

So, I decided to use journalctl to retrieve the logs. They were already available there. All I had to do was grep it:

journalctl | grep puppet

Just one observation: journalctl is non-persistant, which means it throws away the logs at every boot, so if you want to keep your logs you have to change this behaviour.

Community
  • 1
  • 1
EGS
  • 409
  • 4
  • 23