SSL Enabling: Tomcat in Windows 7 [closed]
Want to improve this question? Upda开发者_运维知识库te the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionWhen i try to enable the SSL (editing server.xml to enable port:8443 as HTTPS) in Windows 7, its not getting enabled. sometimes it shows (connected to localhost..) and remains hanged. I'm using Windows 7 64-bits/4GB RAM Tomcat 6.0(netbeans bundle), jre 1.6(64-bit).
I made it work on my case, the problem is the protocol used. In the file server.xml change the connector option protocol="HTTP/1.1" to protocol="org.apache.coyote.http11.Http11NioProtocol"
The section should look something like following.
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="C:\pathtocert\cert.bin"
keystorePass="****" />
I encountered the problem even after I installed the tomcat for 32-bit windows. Finally I found a way to solve it, that is to delete the tcnative-1.dll
file under ${CATALINA_HOME}/bin
Solution: Update the server.xml file as follows:
<Connector port="8443"
protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="C:\Program Files\Java\jdk1.6.0_25\keystore\.keystore"
keystorePass="changeit"
clientAuth="false"
sslProtocol="TLS" />
Please note that i changed the protocol from "HTTP/1.1"
to "org.apache.coyote.http11.Http11Protocol"
This should fix the problem.
You can get some detail in the output by adding the following java options. Better do that in catalina.cmd and run directly this command file from the cmd prompt (easier that digging for the log if you have set tomcat as a service - in which case, stop the service beforehand until you get this sorted out to free the ports).
-Djavax.net.debug=all
-Djavax.net.debug=ssl:handshake:data
I'm running into the same problem, so far I see an error regarding to the certificate. The way I fixed is using the non windows version. It works smooth but the drawback is that no service possible for running in standalone.
精彩评论