Tomcat ssl error reporting Connector attribute must defined when using SSL with APR solution

  • 2020-05-13 03:58:37
  • OfStack

Today, my colleague asked me to help configure tomcat ssl, and I sent him the article that linux tomcat ssl tomcat ssl. However, he unexpectedly said that when tomcat was activated, Connector attribute SSLCertificateFile must be defined when SSL SSL with I sent tomcat6 to him. I checked key and checked the configuration file. Because he copied the configuration I sent to him directly, it took him 2-3 hours to solve the problem.

System: windows 7
Environment: tomcat7

1. Generate key for him again


keytool -genkey -alias tomcat -keyalg RSA Enter keystore password:  password
Re-enter new password: password
What is your first and last name?
  [Unknown]:  Loiane Groner
What is the name of your organizational unit?
  [Unknown]:  home
What is the name of your organization?
  [Unknown]:  home
What is the name of your City or Locality?
  [Unknown]:  Sao Paulo
What is the name of your State or Province?
  [Unknown]:  SP
What is the two-letter country code for this unit?
  [Unknown]:  BR
Is CN=Loiane Groner, OU=home, O=home, L=Sao Paulo, ST=SP, C=BR correct?
  [no]:  y
 
Enter key password for
    (RETURN if same as keystore password):  password
Re-enter new password: password


2. ssl tomcat configuration

Open the server.xml file and they are


<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" enableLookups="false"
           acceptCount="100" disableUploadTimeout="true"
           maxThreads="150" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS"
           keystoreFile="Users\loiane/.keystore"
           keystorePass="password" />

Is amended as:


<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
           enableLookups="false"
           acceptCount="100" disableUploadTimeout="true"
           maxThreads="150" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS"
           keystoreFile="Users\loiane/.keystore"
           keystorePass="password" />


Related articles: