Workaround LogbackValve Lack of Async Support

感情迁移 提交于 2019-12-24 08:31:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!