Problem connecting SSL https on port 8443

We are having problems connecting to https (port 8443) in an application that runs on Tomcat 7. Now the application runs on http (port 80). I uncommented the section "Define SSL ..." in the server.xml file and set all the property values ​​(see below). However, when I try to run the application through a browser, I get an error: "The remote device or resource will not accept the connection."

In addition, when I run the ports utility on the server to see which ports are open and listening, it displays port 80 for Tomcat, as well as port 443. Java version 1.6, version Tomcat 7.

Any ideas would be greatly appreciated as I banged my head on this for several weeks.

<connector port="443" maxhttpheadersize="8192" maxthreads="150" minsparethreads="25" maxsparethreads="75" enablelookups="false" disableuploadtimeout="true" acceptcount="100" scheme="https" secure="true" sslprotocol="TLS" clientauth="false" keystorefile="K:/tomcat1.keystore" keystorepass="password" 

The command I used to create the keystore file

 keytool -genkey -alias tomcat -keyalg RSA -keystore K:/tomcat1.keystore 

password: password

I could see cmd on the command line - OpenSSL started successfully when the tomcat server started.

help me

+4
source share
1 answer

Atlast started working ... Installed a new copy of the server, modified server.xml, as shown below,

 <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> <!-- A "Connector" using the shared thread pool--> <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> --> <!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation --> <Connector SSLEnabled="true" acceptCount="100" clientAuth="false" disableUploadTimeout="true" enableLookups="false" keystoreFile="k:/tomcat.keystore" keystorePass="*****" maxThreads="25" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslProtocol="TLS"/> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/> 

Used below to generate a keystore file

 keytool -genkey -alias tomcat -keyalg RSA -keystore k:/tomcat.keystore 
+5
source

Source: https://habr.com/ru/post/1489534/


All Articles