Configured SSL on Tomcat 8 and Connection Times Out

霸气de小男生 提交于 2019-12-05 09:51:47
LuvnJesus

When I configure tomcat, if there's a delay before I see any response, it is almost always because the PORT is blocked for some reason. Are you positive port 443 is open through the firewall (assuming this is being done on an external server)?

If your standard port works fine but 443 just sits and spins for a period of time before failing, I'd put my money on a blocked port.

First ensure the 8443 is open,443 is the port reserved for https,you can use it for tomcat,but I prefer to use 8443 or another port different from 443 to avoid conflict with httpd https. For testing from outside

telnet yourserver 8443

Must connect,if not check the firewall. Then check permission of your certificates,pem or keystore(depend from your configuration) must be readable from group or user which run tomcat(on debian is tomcat8,on fedora simply tomcat).

For example,this is my configuration of /etc/tomcat/server.xml

 <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    <Connector
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           port="8443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="/etc/tomcat/keystore" keystorePass="ooops"
           clientAuth="false" sslProtocol="TLS"/>

The keystore perms

ls -lh /etc/tomcat/keystore 
-r--r-----. 1 tomcat tomcat 2,6K 20 dic 01.06 /etc/tomcat/keystore

The port 8443 is open,and I can connect without problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!