Java Tomcat 连接器匹配属性警告

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19432613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 17:07:06  来源:igfitidea点击:

Tomcat Connector Matching Property Warning

javasecuritytomcatsslssl-certificate

提问by nikkatsa

I am trying to configure tomcat to handle connections using SSL, giving a keystore with the certificate of the server and a truststore for the client certificates to trust. The connector configuration looks like below:

我正在尝试将 tomcat 配置为使用 SSL 处理连接,为要信任的客户端证书提供一个带有服务器证书的密钥库和一个信任库。连接器配置如下所示:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
    maxThreads="200"
    SSLEnabled="true"
    scheme="https"
    secure="true"
    keystoreFile="/server_certs/webserver_certificate.p12"
    keystorePass="password"
    keystoreType="pkcs12"
    trustoreFile="/server_cert/truststore_dev.jks"
    trustorePass="changeit"
    trustoreType="jks"
    clientAuth="true"
    sslProtocol="TLS" />

The problem with the above is that i am getting the following WARNINGS in the logs:

上述问题是我在日志中收到以下警告:

"WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'trus toreFile' to 'C:\Apps\apache\apache-tomcat-7.0.41\server_certs\truststore_dev.jk s' did not find a matching property."

“警告:[SetAllPropertiesRule]{Server/Service/Connector} 将属性 'trus toreFile' 设置为 'C:\Apps\apache\apache-tomcat-7.0.41\server_certs\truststore_dev.jk s' 没有找到匹配的属性。 ”

Which i guess means that the truststore is not taken into consideration. When i am trying to access a web page, it complains that the client does not have any certificates that the server requires.

我猜这意味着不考虑信任库。当我尝试访问网页时,它抱怨客户端没有服务器需要的任何证书。

Is there anything wrong i am doing? I thought the trustoreFile, truststorePassand truststoreTypeare common properties of the Connector.

我做错了什么吗?我认为trustoreFiletruststorePasstruststoreType是连接器的常见属性。

Any help much appreciated.

非常感谢任何帮助。

采纳答案by Stephen C

You have misspelled some of the attribute names. For example, there is no "trustoreFile"attribute ... but there is a "truststoreFile"attribute.

您拼错了一些属性名称。例如,没有"trustoreFile"属性……但有一个"truststoreFile"属性。

See http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Supportfor the correct spellings.

有关正确拼写,请参阅http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support