I am trying to enable HTTPS on my local stand-alone tomcat 8.5.20. Ive seen various questions about the error, but none of them seemed to help
These are the steps I took : 1) "%JAVA_HOME%\bin\keytool" -genkey -alias tomcat -keyalg RSA -keystore C:\tomcat\conf\mykeystore.jks Enter keystore password ABCDEF . . Enter key password for ( pressed return )
Note that I do not do an openSSL prior to this step...
2) "%JAVA_HOME%\bin\keytool" -importkeystore -srckeystore C:\tomcat\conf\mykeystore.jks -destkeystore C:\tomcat\conf\mykeystore.jks - deststoretype pkcs12
3) Add the following to server.xml ( the initial commented out SSL had certificateKeystoreFile but when i looked at apache, they did not list that as an option ive also removed the keystorePass since that wasnt in the original ):
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true" >
<SSLHostConfig>
<Certificate keystoreFile="conf/mykeystore.jks" keystorePass="ABCDEF"
type="RSA"/>
</SSLHostConfig>
</Connector>
4) Restarted tomcat.
5) In chrome typed in "https://localhost:8443/myapp" and it just times out.
6) In the catalina.log i get : Failed to initialize end point associated with ProtocolHandler ["https-jsse-nio-8443"]
I also edited the starting parameters for tomcat and added
-Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStore=c:\tomcat\conf\mykeystore.jks
even https://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html looks different then what is in my server.xml