We’ll change knife.rb to log to STDERR.
It unclear to me whether these messages indicate a problem or perhaps just
more logging by chef. But as long as the commands aren’t failing, we can
live with that.
From: Daniel DeLeo firstname.lastname@example.org
Date: 04/22/2015 12:36 PM
Subject: [chef] Re: Server 500 errrors from knife environment show
Sent by: Daniel DeLeo email@example.com
On Wednesday, April 22, 2015 at 9:36 AM, John McMeeking wrote:
I’ve noticed occasional messages like the following when running commands
like “knife environment show”:
ERROR: Server returned error 500 for
1/5 in 4s
The command completes after this retry, but it was run from a tool that
uses the command to capture the output and process it as JSON file. The
error is logged to stdout, and thus appears in the JSON file. The error is
not frequent - I might see it once before tearing the system down and
reinstalling chef-server for another round of testing.
I started seeing these after we moved to chef server 12.0.5 from chef
Given that the retry is successful, should this should be logged to the
console? Does this reflect a problem that needs fixing - either in chef, or
something in our environments?
The source of this problem is that the logger is configured with the same
defaults for both chef-client and knife, but users have different
expectations of how these tools behave in terms of what output goes where.
It’s probably a good idea for knife to configure the logger to use stderr
by default. In the short term, you can use the log location setting in your
knife config file to send log output like this to stderr.