[PDB-1020] PuppetDB terminus contains `puts` statement that causes duplicate error messages in daemon.log file Created: 2014/09/19  Updated: 2015/07/10  Resolved: 2014/11/14

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 3.0.0

Type: Bug Priority: Normal
Reporter: Ruth Linehan Assignee: Chris Price
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File pe-puppetserver-daemon.log    
Template:
Affects Build: 3.4.0-rc1-884-g4de47ea
Story Points: 2
Sprint: PuppetDB 2014-11-19
QA Contact: Ryan Gard

 Description   

See attached log. This was on el-6 x64 vagrant vm, but I believe I've seen it on others as well.

This happens during a PE install.



 Comments   
Comment by Kevin Corcoran [ 2014/09/19 ]

It's surprising that this is message appears in -daemon.log, which is STDOUT/STDERR. I looked through the trace briefly but couldn't find an offending println or puts.

Comment by Chris Price [ 2014/09/30 ]

This is probably just a matter of adding a new dependency to the project.clj; there are maven artifacts that serve as a bridge layer between older logging frameworks like java.util.logging / log4j and logback. I think I dealt with a similar problem in PuppetDB with ActiveMQ a while back. So it may be as simple as adding the bridge dependency to project.clj.

However, Jeremy says that this comes from one of our own logger statements, in which case Kevin suggests that perhaps we're simply importing the wrong Logger class (not slf4j?)

Comment by Kevin Corcoran [ 2014/09/30 ]

I just looked at the code and it looks like this error is correctly going through slf4j, not using java.util.logging or anything like that.

Comment by Chris Price [ 2014/09/30 ]

We should do an experiment to see if log messages from clj-http-client go through logback when called directly from clojure; it may be the fact that the stack trace in question is going through ruby that is causing the issue.

Comment by Chris Price [ 2014/10/05 ]

I can repro this on OSS puppet-server by simply configuring the server to talk to PuppetDB, but w/o actually having a running instance of PuppetDB.

An interesting note, though: it appears that there are some similar/equivalent log messages that do show up in the correct log file at the same time that the stack is printed to STDOUT.

Comment by Chris Price [ 2014/10/05 ]

This is coming from this line in PuppetDB:

https://github.com/puppetlabs/puppetdb/blob/0b38aace8d259779e3f21ef0b89ddcb0970a93f5/puppet/lib/puppet/util/puppetdb/command.rb#L77

After the `puts`, the code does raise the exception, so it should still get caught in our code and logged appropriately. Therefore, I think this is more of an annoyance.

Suggested course of action:

1. confirm that the errors are also being logged properly via the normal logging system
2. open a bug against puppetdb
3. close this one as "won't fix"?

Comment by Chris Price [ 2014/11/07 ]

Ken Barber Ryan Senior Wyatt Alt would you guys be good with me just moving this ticket over to PDB? Only the last comment here is really relevant, this is the thing I mentioned at the end of our call the other day.

Comment by Wyatt Alt [ 2014/11/08 ]

Chris Price that would be great, thanks.

Comment by Chris Price [ 2014/11/10 ]

Wyatt Alt done, thanks.

Generated at Sun Aug 25 04:04:43 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.