Error starting Tomcat 10 after building/installing native library 2.0.7 on RHEL Linux 8 with OpenSSL 3.3 and APR 1.74

  Kiến thức lập trình

Getting this on startup when installing Tomcat 10.1.23

I have tomcat 9 with APR1.7.2, OpenSSL 1.1.1t and Tomcat Native 1.2.36 working fine, but security wants us to upgrade.

Getting this error on startup

15-May-2024 11:09:57.388 WARNING [main] org.apache.catalina.core.AprLifecycleListener.init 
    The Apache Tomcat Native library failed to load. The error reported was [
    /opt/tomcat/apache-tomcat-10.1.23/lib/libtcnative-2.so.0.0.7: 
    /opt/tomcat/apache-tomcat-10.1.23/lib/libtcnative-2.so.0 $  
    java.lang.UnsatisfiedLinkError: 
    /opt/tomcat/apache-tomcat-10.1.23/lib/libtcnative-2.so.0.0.7: 
    /opt/tomcat/apache-tomcat-10.1.23/lib/libtcnative-2.so.0.0.7: 
    undefined symbol: OSSL_PROVIDER_get0_name

OpenJDK 11 installed
configured, built and installed APR 1.7.4
configured, built and installed OpenSSL 3.3 (openssl version returns 3.3)
configured, built and installed tomcat native 2.0.7

server.xml

    <Listener className="org.apache.catalina.core.AprLifecycleListener"  SSLEngine="on" />

tomcat lib

    -rw-rwS---.  1 tomcat tomcat   28645 Apr 16 08:17 jaspic-api.jar  
    -rw-rwS---.  1 tomcat tomcat   78508 Apr 16 08:17 jsp-api.jar  
    -rw-r--r--.  1 tomcat tomcat  821520 May 15 11:05 libtcnative-2.a  
    -rwxr-xr-x.  1 tomcat tomcat    1043 May 15 11:05 libtcnative-2.la  
    lrwxrwxrwx.  1 tomcat tomcat      22 May 15 11:05 libtcnative-2.so -> libtcnative-2.so.0.0.7  
    lrwxrwxrwx.  1 tomcat tomcat      22 May 15 11:05 libtcnative-2.so.0 -> libtcnative-2.so.0.0.7  
    -rwxr-xr-x.  1 tomcat tomcat  513576 May 15 11:05 libtcnative-2.so.0.0.7  
    -rw-rwSr--.  1 tomcat tomcat 1327628 May 13 08:26 mssql-jdbc-9.2.0.jre8.jar  
    -rw-rwS---.  1 tomcat tomcat  366885 Apr 16 08:17 servlet-api.jar  
    -rw-rwS---.  1 tomcat tomcat   11682 Apr 16 08:17 tomcat-api.jar  

setenv.sh

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib:/usr/local/ssl:/usr/local/apr/lib:/usr/local/bin/:/usr/local/lib64/:/usr/local/lib
export LD_LIBRARY_PATH
export CATALINA_OPTS="-Xms512M -Xmx1024M"
[xxxxx ~]$ ldconfig -p | grep native
    libtcnative-2.so.0 (libc6,x86-64) => /lib/libtcnative-2.so.0
    libtcnative-2.so (libc6,x86-64) => /lib/libtcnative-2.so

Cant seem to clear this error. Am i missing a ‘path’ type entry ?
Im not really a Linux guy, but learning…

Help please !

New contributor

user3120504 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT