<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>47605</bug_id>
          
          <creation_ts>2023-09-15 15:17:34 +0300</creation_ts>
          <short_desc>Failed to initialize component при настройке SSL</short_desc>
          <delta_ts>2025-08-22 12:36:06 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>tomcat10</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Evgeny Shesteperov">alimektor</reporter>
          <assigned_to name="aminov@altlinux.org">aminov</assigned_to>
          <cc>aminov</cc>
    
    <cc>kostevichae</cc>
    
    <cc>serjigva</cc>
    
    <cc>slev</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>233286</commentid>
    <comment_count>0</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-09-15 15:17:34 +0300</bug_when>
    <thetext>Версия

-   tomcat10-10.1.5-alt2_jvm11

Шаги воспроизведения

1.  Выполнить настройку Tomcat:

    apt-get install -y tomcat10 tomcat10-admin-webapps tomcat10-docs-webapp tomcat10-el-5.0-api tomcat10-jsp-3.1-api tomcat10-lib tomcat10-servlet-6.0-api tomcat10-webapps java-17-openjdk-headless java-17-openjdk-devel
    systemctl disable --now ahttpd
    systemctl enable --now tomcat &amp;&amp; sleep 5; systemctl status tomcat --no-pager -l
    netstat -ltupn | grep 8080
    echo http://$(hostname -i):808

2.  Создать сертификаты:

    keytool -genkey -alias tomcat -keyalg RSA -keystore /usr/share/mystore -validity 999 -keysize 512 &amp;&amp; \
    keytool -genkey -alias client -keyalg RSA -keystore /usr/share/myclientstore -storetype PKCS12 -validity 999 -keysize 512 &amp;&amp; \
    keytool -export -alias client -keyalg RSA -keystore /usr/share/myclientstore -storetype PKCS12 -file /usr/share/clientcert &amp;&amp; \
    keytool -import -alias client -keyalg RSA -keystore /usr/share/mytruststore -storetype JKS -file /usr/share/clientcert

3.  В файл /etc/tomcat/server.xmlдобавить строки:

    &lt;Connector
    protocol=&quot;org.apache.coyote.http11.Http11NioProtocol&quot;
    sslImplementationName=&quot;org.apache.tomcat.util.net.jsse.JSSEImplementation&quot;
    port=&quot;8443&quot;
    SSLEnabled=&quot;true&quot;
    maxHttpHeaderSize=&quot;8192&quot; 
    maxThreads=&quot;150&quot;
    minSpareThreads=&quot;25&quot;
    maxSpareThreads=&quot;200&quot;
    enableLookups=&quot;false&quot;
    disableUploadTimeout=&quot;true&quot;
    acceptCount=&quot;100&quot;
    scheme=&quot;https&quot;
    secure=&quot;true&quot;
    clientAuth=&quot;true&quot;
    sslProtocol=&quot;TLS&quot;
    sslEnabledProtocols=&quot;TLSv1.2&quot;
    keystoreFile=&quot;/usr/share/mystore&quot;
    keystorePass=&quot;123456&quot;
    keystoreType=&quot;JKS&quot;
    keyAlias=&quot;tomcat&quot;
    truststoreFile=&quot;/usr/share/mytruststore&quot;
    truststorePass=&quot;123456&quot;
    truststoreType=&quot;JKS&quot;
    ciphers=&quot;
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
    TLS_RSA_WITH_AES_128_CBC_SHA256,
    TLS_RSA_WITH_AES_128_CBC_SHA
    &quot;
    /&gt;

4.  Перезапустить сервис:

    systemctl restart tomcat; sleep 3; systemctl status tomcat

5.  Проверить порт:

    netstat -ltupn | grep 8443

Ожидаемый результат: коннектор работает.

Фактический результат: коннектор не работает. В логах харакертерное:

    Failed to initialize component [Connector[org.apache.coyote.http11.Http11NioProtocol-8443]]
    . . . . .
    org.apache.catalina.LifecycleException: Protocol handler initialization failed
    . . . . .
    Caused by: java.lang.IllegalArgumentException: No SSLHostConfig element was found with the hostName [_default_] to match the defaultSSLHostConfigName for the connector [https-jsse-nio-8443]

Аналогичный конфиг с Tomcat 9 работает корректно.

Что-то похожее уже видел:

-   https://superuser.com/questions/1788641/unable-to-start-tomcat-10-with-https-connector</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>271270</commentid>
    <comment_count>1</comment_count>
    <who name="Kostevich Arseniy">kostevichae</who>
    <bug_when>2025-08-22 12:36:06 +0300</bug_when>
    <thetext>(Ответ для Evgeny Shesteperov на комментарий #0)
&gt; https://superuser.com/questions/1788641/unable-to-start-tomcat-10-with-https-
&gt; connector
Ответили, что данная конфигурация устарела.

Проверил с конфигурацией 
&lt;Connector port=&quot;8443&quot; protocol=&quot;org.apache.coyote.http11.Http11NioProtocol&quot;
           maxThreads=&quot;150&quot; SSLEnabled=&quot;true&quot;&gt;
    &lt;SSLHostConfig&gt;
            &lt;Certificate certificateKeystoreFile=&quot;/usr/share/tomcat.keystore&quot;
                     certificateKeystorePassword=&quot;123456&quot;
                     type=&quot;RSA&quot; /&gt;
    &lt;/SSLHostConfig&gt;
&lt;/Connector&gt;

Работает корректно.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>