我的命令为
keytool -genkey -alias examplecas -keypass changeit -keyalg RSA -keystore D:\keys\server.keystore
keytool -export -alias examplecas -keypass changeit -file d:/keys/server.crt -keystore d:/keys/server.keystore
keytool -import -alias examplecas -file d:/keys/server.crt -keypass changeit -keystore D:\jdk16\jdk1.6.0_19\jre\lib\security\cacertsLaixiao
tomcat配置为:
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="D:\keys\server.keystore" keystorePass="111111"/>
错误信息为
2011-7-24 19:55:44 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'clientA
uth' to 'false' did not find a matching property.
2011-7-24 19:55:44 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystor
eFile' to 'D:\keys\server.keystore' did not find a matching property.
2011-7-24 19:55:44 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystor
ePass' to '111111' did not find a matching property.
2011-7-24 19:55:45 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-7-24 19:55:45 org.apache.coyote.http11.Http11AprProtocol init
严重: Error initializing endpoint
java.lang.Exception: No Certificate file specified or invalid file format
at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:723)
at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav
a:107)
at org.apache.catalina.connector.Connector.initialize(Connector.java:102
2)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:703)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2011-7-24 19:55:45 org.apache.catalina.core.StandardService initialize
严重: Failed to initialize connector [Connector[HTTP/1.1-8443]]
LifecycleException: Protocol handler initialization failed: java.lang.Exception
: No Certificate file specified or invalid file format
at org.apache.catalina.connector.Connector.initialize(Connector.java:102
4)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:703)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2011-7-24 19:55:45 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2011-7-24 19:55:45 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 694 ms
2011-7-24 19:55:45 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-7-24 19:55:45 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.32
2011-7-24 19:55:45 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2011-7-24 19:55:45 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2011-7-24 19:55:45 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2011-7-24 19:55:45 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2011-7-24 19:55:45 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2011-7-24 19:55:45 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-7-24 19:55:45 org.apache.coyote.http11.Http11AprProtocol start
严重: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/??
?)????í??
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:649)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:756)
at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.ja
va:137)
at org.apache.catalina.connector.Connector.start(Connector.java:1095)
at org.apache.catalina.core.StandardService.start(StandardService.java:5
40)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2011-7-24 19:55:45 org.apache.catalina.core.StandardService start
严重: Failed to start connector [Connector[HTTP/1.1-8443]]
LifecycleException: service.getName(): "Catalina"; Protocol handler start fail
ed: java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/??????
?/???)????í??
at org.apache.catalina.connector.Connector.start(Connector.java:1102)
at org.apache.catalina.core.StandardService.start(StandardService.java:5
40)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2011-7-24 19:55:45 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2011-7-24 19:55:45 org.apache.catalina.startup.Catalina start
信息: Server startup in 507 ms
9 个解决方案
#1
我也是这个问题、、求救。。。
#2
不同的tomcat版本号ssl的配置有所不同,你用的如果是tomcat6.0的话:
Java code
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" minSpareThreads="5" maxSpareThreads="75"enableLookups="true" disableUploadTimeout="true" acceptCount="100" maxThreads="200" scheme="https" secure="true"SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keystoreFile="F:/apache-tomcat/server.keystore" keystorePass="password"/>
Java code
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" minSpareThreads="5" maxSpareThreads="75"enableLookups="true" disableUploadTimeout="true" acceptCount="100" maxThreads="200" scheme="https" secure="true"SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keystoreFile="F:/apache-tomcat/server.keystore" keystorePass="password"/>
#3
我也遇上这问题 怎么解决 能补充一下吗?
#4
原来我写错了 。。好了 谢谢!!
#5
果真ssl配置问题 谢了!
#6
2楼正解,楼主解决问题了,怎么不给人家分啊?
#7
楼主分享解决过程呀。。。。。。。。。
#8
2楼正解,将 protocol="HTTP/1.1"改成 protocol="org.apache.coyote.http11.Http11NioProtocol" 就行了,这个问题我也遇到了
#9
楼主, 你的单点登录搞定了吗, 我这边也在研究这个, 能否加我qq指导下 非常感谢, 527112461
#1
我也是这个问题、、求救。。。
#2
不同的tomcat版本号ssl的配置有所不同,你用的如果是tomcat6.0的话:
Java code
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" minSpareThreads="5" maxSpareThreads="75"enableLookups="true" disableUploadTimeout="true" acceptCount="100" maxThreads="200" scheme="https" secure="true"SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keystoreFile="F:/apache-tomcat/server.keystore" keystorePass="password"/>
Java code
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" minSpareThreads="5" maxSpareThreads="75"enableLookups="true" disableUploadTimeout="true" acceptCount="100" maxThreads="200" scheme="https" secure="true"SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keystoreFile="F:/apache-tomcat/server.keystore" keystorePass="password"/>
#3
我也遇上这问题 怎么解决 能补充一下吗?
#4
原来我写错了 。。好了 谢谢!!
#5
果真ssl配置问题 谢了!
#6
2楼正解,楼主解决问题了,怎么不给人家分啊?
#7
楼主分享解决过程呀。。。。。。。。。
#8
2楼正解,将 protocol="HTTP/1.1"改成 protocol="org.apache.coyote.http11.Http11NioProtocol" 就行了,这个问题我也遇到了
#9
楼主, 你的单点登录搞定了吗, 我这边也在研究这个, 能否加我qq指导下 非常感谢, 527112461