如题:开启tomcat8的https功能时,在导入证书后,启动服务总是报如下错误,虽说密码信息不正确,但是我配置了好几次,而且密码我确定是对的。 求助.....
tomcat的配置文件如下
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystorefile="D:/keys/wsriakey.keystore" keystorepass="bamboo" />
24-Jun-2016 14:47:26.057 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystorefile' to 'D:/keys/wsriakey.keystore' did not find a matching property. 24-Jun-2016 14:47:26.059 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystorepass' to 'bamboo' did not find a matching property. 24-Jun-2016 14:47:26.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.36 24-Jun-2016 14:47:26.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 9 2016 13:55:50 UTC 24-Jun-2016 14:47:26.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.36.0 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\softhome\jdk1.8\jre 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_91-b14 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: E:\sso\apache-tomcat-8.0.36 24-Jun-2016 14:47:26.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: E:\sso\apache-tomcat-8.0.36 24-Jun-2016 14:47:26.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 24-Jun-2016 14:47:26.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=E:\sso\apache-tomcat-8.0.36\conf\logging.properties 24-Jun-2016 14:47:26.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 24-Jun-2016 14:47:26.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=E:\sso\apache-tomcat-8.0.36\endorsed 24-Jun-2016 14:47:26.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=E:\sso\apache-tomcat-8.0.36 24-Jun-2016 14:47:26.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=E:\sso\apache-tomcat-8.0.36 24-Jun-2016 14:47:26.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=E:\sso\apache-tomcat-8.0.36\temp 24-Jun-2016 14:47:26.092 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\softhome\jdk1.8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\NetSarang;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseGit\bin;D:\softhome\Git\cmd;D:\software\gradle-2.13\bin;D:\software\apache-maven-3.3.9\bin;D:\softhome\solr-6.1.0\bin;D:\softhome\nodejs\;C:\Program Files\WinRAR;C:\Users\admin\AppData\Roaming\npm;. 24-Jun-2016 14:47:26.181 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] 24-Jun-2016 14:47:26.235 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 24-Jun-2016 14:47:26.236 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8443"] 24-Jun-2016 14:47:26.411 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8443"] java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56) at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70) at java.security.KeyStore.load(KeyStore.java:1445) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:449) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:353) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:606) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:546) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:371) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459) at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120) at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:869) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:580) at org.apache.catalina.startup.Catalina.load(Catalina.java:603) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484) Caused by: java.security.UnrecoverableKeyException: Password verification failed at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778) ... 26 more 24-Jun-2016 14:47:26.414 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8443]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8443]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:869) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:580) at org.apache.catalina.startup.Catalina.load(Catalina.java:603) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484) Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:962) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ... 12 more Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56) at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70) at java.security.KeyStore.load(KeyStore.java:1445) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:449) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:353) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:606) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:546) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:371) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459) at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120) at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) ... 13 more Caused by: java.security.UnrecoverableKeyException: Password verification failed at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778) ... 26 more 24-Jun-2016 14:47:26.489 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"] 24-Jun-2016 14:47:26.506 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 24-Jun-2016 14:47:26.563 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 704 ms 24-Jun-2016 14:47:26.621 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
后面我又试了几个版本的tomcat,同样的操作,发现tomcat7可以正常开启,而tomcat8、9都不行。
求tomcat9的解决方案.....
把Tomcat卸载重装,另外的JDK环境配置检查下,百度搜索都有一步步来,肯定可以的。你要把你的项目添加到Tomcat里面么有项目,就是刚下载的tomcat,然后配置8443端口,开启https,我今天试了好几次,都是这样..
如果密码确认是对的话,应该是你的jks文件问题。
或者tomcat8、9的配置和tomcat7不一样了。
keystorefile="D:/keys/wsriakey.keystore"keystorepass="bamboo"把属性keystorefile-->keystoreFile,keystorepass-->keystorePass
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。