tomcat启动时报错:严重: Failed to load keystore type JKS with path C:\Users\36400/.keystore due

2018-5-11 0:41:44 org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore
严重: Failed to load keystore type JKS with path C:\Users\36400/.keystore due to C:\Users\36400\.keystore (系统找不到指定的文件。)
java.io.FileNotFoundException: C:\Users\36400\.keystore (系统找不到指定的文件。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:120)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1014)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)

解决方法:

1.找到tomcat文件夹下的conf文件夹下server.xml

            添加上:

       maxThreads="150" scheme="https" secure="true"  
   keystorefile="c:\key\ssokey.keystore"      keystorepass="sso" 

   clientAuth="false" sslProtocol="TLS"   />

            然后保存。


2.cmd运行:keytool -genkey -alias tomcat -keyalg RSA,

密码:changeit

然后根据提示填写即可,最一步询问是否正确填写:是。 





你可能感兴趣的:(tomcat)