An error occurred while configuring SSL in Tomcat 7: '/root/. keystore' didnotfindamatchingproperty

Source: Internet
Author: User
After you replace Tomcat 6 with Tomcat 7 today, the following exception occurs in the previously used SSL: Settingproperty & amp; #39; keystoreFile & amp; #39; to & amp; #39; /root /. keystore & amp; #39; didnotfindamatchingproperty. after Failedtoload changed TOMCAT6 to TOMCAT7 today, the previously used SSL encountered the following exception:
 
 
 
Setting property 'keystorefile' to '/root/. keystore' did not find a matching property.
 
Failed to load keystore type JKS with path/root/. keystore due to/root/. keystore
Java. io. FileNotFoundException:/root/. keystore
At java. io. FileInputStream. open (Native Method)
At java. io. FileInputStream. (FileInputStream. java: 138)
At org.apache.tomcat.util.net. jsse. JSSESocketFactory. getStore (JSSESocketFactory. java: 400)
At org.apache.tomcat.util.net. jsse. JSSESocketFactory. getKeystore (JSSESocketFactory. java: 306)
At org.apache.tomcat.util.net. jsse. JSSESocketFactory. getKeyManagers (JSSESocketFactory. java: 565)
At org.apache.tomcat.util.net. jsse. JSSESocketFactory. getKeyManagers (JSSESocketFactory. java: 505)
At org.apache.tomcat.util.net. jsse. JSSESocketFactory. init (JSSESocketFactory. java: 449)
At org.apache.tomcat.util.net. jsse. JSSESocketFactory. createSocket (JSSESocketFactory. java: 158)
At org.apache.tomcat.util.net. JIoEndpoint. bind (JIoEndpoint. java: 378)
At org.apache.tomcat.util.net. AbstractEndpoint. init (AbstractEndpoint. java: 554)
At org. apache. coyote. AbstractProtocol. init (AbstractProtocol. java: 409)
At org. apache. coyote. http11.20.acthttp11jsseprotocol. init (AbstractHttp11JsseProtocol. java: 119)
At org. apache. catalina. connector. Connector. initInternal (Connector. java: 956)
At org. apache. catalina. util. LifecycleBase. init (LifecycleBase. java: 102)
At org. apache. catalina. core. StandardService. initInternal (StandardService. java: 559)
At org. apache. catalina. util. LifecycleBase. init (LifecycleBase. java: 102)
At org. apache. catalina. core. StandardServer. initInternal (StandardServer. java: 815)
At org. apache. catalina. util. LifecycleBase. init (LifecycleBase. java: 102)
At org. apache. catalina. startup. Catalina. load (Catalina. java: 594)
At org. apache. catalina. startup. Catalina. load (Catalina. java: 619)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 57)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43)
At java. lang. reflect. Method. invoke (Method. java: 601)
At org. apache. catalina. startup. Bootstrap. load (Bootstrap. java: 281)
At org. apache. catalina. startup. Bootstrap. main (Bootstrap. java: 449)
 
 
You can use the new configuration in TOMCAT7 through Gu Ge and the official website. The modified server. xml is as follows:
 
Tomcat7:
MaxThreads = "150" scheme = "https" secure = "true"
ClientAuth = "false" sslProtocol = "TLS" keystoreFile = "/opt/software/apache-tomcat-7.0.26/conf/keystore/test. keystore" keystorePass = "test123456"/>
 
 
Tomcat6:
  MaxThreads = "150" scheme = "https" secure = "true"
ClientAuth = "false" sslProtocol = "TLS" keystore = "/usr/tomcat/config/test. keystore" keystorePass = "test123456"/>
 
There are some differences between the two. There are two changes with the above two exceptions. The source of relevant parameters can be found at the following official website:
Http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration

From Column zilong00007
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.