Bug 2124703 - Http11AprProtocol / SSL fails with tomcat-native 2.01
Summary: Http11AprProtocol / SSL fails with tomcat-native 2.01
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat-native
Version: 36
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: huwang
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-06 20:33 UTC by Michael Katzmann
Modified: 2023-05-25 19:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-25 19:28:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Katzmann 2022-09-06 20:33:32 UTC
Description of problem:
 With upgrade to 2, Http11AprProtocol fails with the error below in the log. This was working correctly until the lates update to 2.01.

06-Sep-2022 16:15:46.812 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-openssl-apr-8443"]
06-Sep-2022 16:15:46.815 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[org.apache.coyote.http11.Http11AprProtocol-8443]]
	java.lang.UnsatisfiedLinkError: 'long org.apache.tomcat.jni.Address.info(java.lang.String, int, int, int, long)'
		at org.apache.tomcat.jni.Address.info(Native Method)
		at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:360)
		at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1227)
		at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1240)
		at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:603)
		at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
		at org.apache.catalina.connector.Connector.initInternal(Connector.java:1048)
		at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
		at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
		at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
		at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1045)
		at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
		at org.apache.catalina.startup.Catalina.load(Catalina.java:724)
		at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
		at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)


Version-Release number of selected component (if applicable):
tomcat-native-2.0.1-1.fc36.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Configure Tomcat for Http11AprProtocol 
   My 'server.xml' includes ...

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>


2.
  Start Tomcat server
3.
  No service on ssl port (see error above)

Actual results:
  No SSL service - 
06-Sep-2022 16:15:46.815 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[org.apache.coyote.http11.Http11AprProtocol-8443]]
	java.lang.UnsatisfiedLinkError: 'long org.apache.tomcat.jni.Address.info(java.lang.String, int, int, int, long)'
		at org.apache.tomcat.jni.Address.info(Native Method)

Expected results:
  SSL service on designated port

Additional info:

Comment 1 Michael Katzmann 2022-09-06 21:09:09 UTC
Actually, probably not significant but the server.xml is slightly different ...

    <!-- sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout Gutenberg.key -out Gutenberg.crt -->
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
            maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="/etc/tomcat/Gutenberg.key"
                         certificateFile="/etc/tomcat/Gutenberg.crt"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>

Comment 2 Coty Sutherland 2022-09-07 01:08:34 UTC
That behavior is expected as Tomcat Native 2.0.x does not support the APR connectors. We should have only updated Rawhide to tomcat-native 2.0 in preparation for updating to Tomcat 10.1.

If you want to keep using tomcat-native, you'll need to switch to NIO/2 or downgrade. Apologies for the inconvenience; I'll try to sort this out quickly...

Comment 3 Michael Katzmann 2022-09-07 02:07:04 UTC
OK, thanks yes I can change to NIO2.

Comment 4 Coty Sutherland 2022-09-15 18:43:29 UTC
We resolved this by downgrading tomcat-native back to 1.2.x for F36 (& F37). The upgrade to version 2.0.x will occur in rawhide/F38+.

If you have some time, please test the package that's currently in testing - https://bodhi.fedoraproject.org/updates/FEDORA-2022-bef61c3be3.

Thanks for your report!

Comment 5 Coty Sutherland 2023-01-13 20:58:51 UTC
Marking this issue as resolved since the update has moved to stable.

Comment 6 Coty Sutherland 2023-03-07 18:44:28 UTC
I've reopened this issue due to complaints about tomcat-native 2.0.x being incompatible (because APR was removed) with tomcat 9 configurations (that use the APR connector) in F38+ and EPEL 9. We have not, and will not, be moving to Tomcat 10.1 soon enough to justify keeping tomcat-native 2.0.x available so we need to rollback to 1.2.x like we did in c#4. This shouldn't cause any issues since the biggest change (removed feature) will be added back and available for use again.

We will upgrade to tomcat-native 2.0.x whenever the tomcat package is upgraded to 10.1.

Comment 7 huwang 2023-03-10 03:02:17 UTC
I have downgraded tomcat-native from 2.0.x to 1.2.x.

Comment 8 Ben Cotton 2023-04-25 18:25:17 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Ludek Smid 2023-05-25 19:28:47 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.