天天看點

解決[SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxTheads' to '500' did not fin

Tomcat 6,JDK 1.6。

在配置使用apr時,啟動Tomcat伺服器後,在Catalina.log中出現如下警告:

警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxTheads' to '500' did not find a matching property.

2010-7-4 20:49:35 org.apache.catalina.startup.SetAllPropertiesRule begin

警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'minSpareTheads' to '100' did not find a matching property.

2010-7-4 20:49:35 org.apache.catalina.startup.SetAllPropertiesRule begin

警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareTheads' to '300' did not find a matching property.

但是通路應用程式正常。

通過網上搜尋,具體解決方法如下:

server.xml中的配置HTTPS的那部分Connector代碼

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"

               maxThreads="150" scheme="https" secure="true"

               clientAuth="false" sslProtocol="TLS"

               keystoreFile="你的.keystore檔案" />

将protocol參數由"HTTP/1.1"改成"org.apache.coyote.http11.Http11Protocol",重新啟動Tomcat,搞定!

根據Tomcat官方的文檔http://tomcat.apache.org/tomcat-6.0-doc/config/http.html,"HTTP/1.1"和"org.apache.coyote.http11.Http11Protocol"是一樣的,但是不知道為什麼前者會出錯而後者就是對的,而且HTTP部分的Connector用的也是"HTTP/1.1"。