Reputation: 717
When I am starting my tomcat server, I am getting these kinds of logs on my tomcat console/tomcat window, what does this mean? I don't want these logs, How should I remove it? I am using tomcat 9 and ubuntu 16.04.
APR Statistical data ....
Poll Statistics .........
Polls created : 0
Polls destroyed : 0
Polls cleared : 0
Network Statistics ......
Sockets created : 0
Sockets accepted : 0
Sockets closed : 0
Sockets cleared : 0
Total send calls : 0
Minimum send length : 10000000
Maximum send length : 0
Average send length : -nan
Total recv calls : 0
Minimum recv length : 10000000
Maximum recv length : 0
Average recv length : -nan
Receive timeouts : 0
Receive errors : 0
Receive resets : 0
Last receive error : 0
Total sendfile calls : 0
Minimum sendfile length : 10000000
Maximum sendfile length : 0
SSL Network Statistics ..
Sockets created : 0
Sockets accepted : 0
Sockets closed : 0
Sockets cleared : 0
APR Terminated
I am getting above data each time APR is terminated and folowing warning SEVERE [main] org.apache.catalina.core.AprLifecycleListener.init An incompatible version 1.1.33 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.2.6
Upvotes: 0
Views: 727
Reputation: 20837
You have a libtcnative
compiled with the TCN_DO_STATISTICS
flag set to true. The only way to remove these log lines (which always print to stderr) is to recompile your libtcnative
library.
The good news is that the APR connector only dumps this data when APR is being shut down, so it shouldn't be doing that e.g. on every request or connection.
You must be using an APR connector on the Tomcat side. I'd recommend switching from that connector to the NIO connector (the default) anyway for a number of reasons. If libtcnative
is available, OpenSSL will still be used for fast TLS (compared to slow JSSE-based TLS), but APR will not be used for the sockets, and these messages should disappear.
Update 2017-05-29
In order to switch from the APR-based connector to NIO-based connector, simply set the "protocol" in your <Connector>
in server.xml
to protocol="org.apache.coyote.http11.Http11NioProtocol"
. The default is to auto-switch when the tcnative
library is present. [reference]
Upvotes: 1