logging - Exception while attempting to add an entry to the access log -
tomcat 7 can't write access log , throws following exception.
nov 17, 2016 5:10:37 pm org.apache.catalina.connector.coyoteadapter log warning: exception while attempting add entry access log java.lang.nullpointerexception @ org.apache.catalina.connector.coyoteadapter.log(coyoteadapter.java:555) @ org.apache.coyote.ajp.ajpprocessor.process(ajpprocessor.java:182) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:611) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:314) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61) @ java.lang.thread.run(thread.java:745)
how fix this?
this known issue in tomcat fixed in tomcat 8.0.29. upgrading tomcat should resolve problem. https://bz.apache.org/bugzilla/show_bug.cgi?id=58578
other way modify access logging pattern not include cookie. use this:
pattern="%t %h request:%{sessionid}r %m %u %s %q %r"
instead of
pattern="%t %h cookie:%{sessionid}c request:%{sessionid}r %m %u %s %q %r"
in server.xml.
<!-- access log processes example. documentation at: /docs/config/valve.html note: pattern used equivalent using pattern="common" --> <valve classname="org.apache.catalina.valves.accesslogvalve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </host> </engine>
Comments
Post a Comment