1

I have just installed tomcat 10 and tried to integrate a jks file that i have been using in a tomcat 9 installation with no issue, but i was unable to start the tomcat 10 with it. Can anyone please provide a working https config for tomcat 10 i would prefer if it was with a jks file but i would be happy with pem, crt, p12 or any other certificate format.

below are the error that i have got while trying to start the tomcat 10 with jks file.

Caused by: java.lang.IllegalArgumentException: no element SSLHostConfig found with hostName [_default_] corresponding to defaultSSLHostConfigName for the connector [https-jsse-nio-8443]

1 Answer 1

1

Caused by: java.lang.IllegalArgumentException: no element SSLHostConfig found with hostName [default] corresponding to defaultSSLHostConfigName for the connector [https-jsse-nio-8443]

The above error message is mostly triggered when you are using some deprecated SSL attributes such as keystoreFile, keystorePass which are no longer available in Tomcat 10, refer [1].

Attributes like keystoreFile and keystorePass are marked as deprecated in Tomcat 9 and removed completely from Tomcat 10.

You can include the certificate details inside the <SSLHostConfig> tag as shown below:

<!-- Define an SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    port="8443"
    maxThreads="150"
    SSLEnabled="true">
  <SSLHostConfig>
    <Certificate
      certificateKeystoreFile="${user.home}/.keystore"
      certificateKeystorePassword="changeit"
      type="RSA"
      />
    </SSLHostConfig>
</Connector>

References

[1] Tomcat 10: SSL/TLS and Tomcat

[2] Tomcat 9: SSL Support - Connector - NIO and NIO2 (deprecated)

[3] Tomcat 9: SSL Support - Connector - APR/Native (deprecated)

Regards,
Bharat

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .