Tomcat: Native library which allows using OpenSSL was not found

21,166

I figured out what the issue was.

I had already set up an SSL/TLS/HTTPS connection protocol in the opt/tomcat/conf/server.xml file:

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

but the *.war file that was gonna use the connection was not put in the opt/tomcat/webapps directory.

Here's how I solved it:

I simply added the *.war file in the opt/tomcat/webapps directory of tomcat, and then I restarted the tomcat server using:

sudo systemctl restart tomcat

And everything worked fine.

That's all.

I hope this helps

Share:
21,166

Related videos on Youtube

Promise Preston
Author by

Promise Preston

Gifted, Diligent and Result Oriented

Updated on July 09, 2022

Comments

  • Promise Preston
    Promise Preston almost 2 years

    I just setup a new Java project with Tomcat 9 on Ubuntu 18.04.

    However, when I start the Tomcat server using the command

    sudo systemctl restart tomcat
    

    I get the following error:

    The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path

    I still can figure out what the issue is.

  • Michael-O
    Michael-O over 3 years
    Your answer does absolutely not relate to the APR/OpenSSL problem.
  • Ankit Sahu
    Ankit Sahu about 3 years
    Even I am facing the same problem. Did you find the solution.