问题
I'm trying to create a Zipkin 1.31.1 server using Spring Boot 1.3.5.RELEASE to build a fat executable JAR with with Tomcat 8.0.33 embedded in it. This is failing with the following error message:
java.lang.IllegalArgumentException: Async support must be enabled on a servlet and for all filters involved in async request processing. This is done in Java code using the Servlet API or by adding "<async-supported>true</async-supported>" to servlet and filter declarations in web.xml. Also you must use a Servlet 3.0+ container
as described in Spring Boot Enable Async Supported Like in web.xml even with the suggested fix.
After setting breakpoints in the debugger, I found that the problem is the same as described in
How to Make LogbackValve async Supported
which wasn't answered and ultimately had the following improvement request created:
ch.qos.logback.access.tomcat.LogbackValve is not async-supported
Does anyone have any recommendations how I can workaround this issue? I need help either:
- Replacing LogBackValve in the pipeline with a wrapper that supports async behavior
OR
- Disabling LogbackValve and/or removing it from the pipeline and living without its benefits
Any help you can provide would be much appreciated. Thanks!
回答1:
I figured out how to disable the bean that was injecting LogbackAccess. This resolved the issue so that Zipkin is now accepting requests.
来源:https://stackoverflow.com/questions/46479182/workaround-logbackvalve-lack-of-async-support