-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logback-access RequestLog not working #7617
Comments
logback-access is doing truly bad things with it's It's incredibly bad for a RequestLog to START reading request body content during the RequestLog. It was first noticed in Issue #6973 The fix needs to be on the logback side, and we've submitted this PR to them already - qos-ch/logback#532 Your options are to make a fork of logback-access with that PR, convince logback to merge that PR, or use something else (our |
Thanks for the fast response. I noticed that logback doesn't stay that much up-to-date when trying to upgrade to Jetty 10. There I first hit your PR at their project. It just seemed odd to me, that a minor Jetty update suddenly broke the logback request logging, but I totally understand your intention there. I will just stay on Jetty 11.0.7 until this gets fixed on their side. |
logback-access as it exists now has many bugs that means you should avoid using it for any release of Jetty 10 (even 10.0.7)
|
logback-access issues have existed for the entirety of Jetty 10.0.x, it's not unique for 10.0.8. I'm surprised you didn't hit the 100% CPU bug with it already. The scenario: (that exist in Jetty 10.0.0 thru 10.0.7)
|
I was just doing upgrades for Dropwizard after we planned upgrading to Jakarta APIs. We formerly stayed on Jetty 9.x.x quite a long time and would now want to upgrade to Jetty 10 and Jetty 11. Therefore I didn't experience any logback issue with Jetty before. As we allow customization of the request logging related to logback's APIs, I think we wouldn't want to upgrade to Jetty's request logging mechanism as this could break many implementations. The third option to use logback-access eith Jetty is to provide a custom But I wouldn't want to do this when it's avoidable. Therefore many thanks for your PR at logback and I just hope it gets merged soon. |
The 100% CPU issue with logback-access exists in Jetty 9.1.0 thru 9.4.43 as well. (it was fixed in 9.4.44) Note that if you have any requests that result in a 400 response (Bad Request) you also have a fatal failure in logback-access. |
I opened PR #7618 with more hardening for bad RequestLog implementations. (Once approved it will be merged up into Jetty 11.x and 12.x) This is not a 100% solution as there's far too many code paths based on configuration to catch all of these bad behaviors. |
Many thanks for all the detailed answers. If logback-access is that unstable regarding Jetty, I'll take a look at Jetty's request logging implementation and maybe we could provide a module for that at Dropwizard. The PR looks good, I think this should fix the current problem from Jetty's end. I hope to see a solution from Logback soon too, but I'm not too optimistic about that yet. |
Jetty version(s)
11.0.8
Java version/vendor
(use: java -version)
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode)
OS type/version
Ubuntu 20.04.3 LTS
Description
After upgrading Jetty from 11.0.7 to 11.0.8 the request logging through logback doesn't work any more. A
NullPointerException
gets thrown from here. I only see this commit related to this issue. As_contentParamsExtracted = true
is set, theextractContentParameters()
method of theRequest
class gets not executed and_contentParameters
isnull
.The text was updated successfully, but these errors were encountered: