APR not available

发布时间:2022-06-29 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了APR not available脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

Tomcat三种请求处理方式:BIO、NIO、APR 

APR为从从做系统级别解决异步IO问题,大幅度提高服务器的处理和响应速度

最近在升级启动程序时,出现如下错误

[ERROR] main 08:55:17 LifecycleBase:175(log) Failed to initialize component [Connector[org.apache.coyote.http11.Http11AprProtocol-8080]]
....
[INFO] main 08:55:17 AprLifecycleListener:173(log) The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
......
org.apache.catalina.LifecycleException: The configured protocol [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native library which is not available
Caused by: java.lang.Exception: APR not available
        at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:295)
        at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1067)
        at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1149)
        at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:561)
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:998)
        ... 20 common frames omitted

 

可能原因:

1、APR未安装或者安装不正确

2、APR安装,但环境变量未生效

解决方法:

1、APR未安装或者安装不正确,则可以再次尝试安装APR

2、环境变量未生效,则可以查看下/etc/profile下是否已经export APR的地址,比如:export LD_LIBRARY_PATH=/usr/aprlib/lib,如果不存在,则添加(地址根据时机情况配置),如果存在该配置还不生效,则可以在程序的启动脚本中,在启动之前添加该export

脚本宝典总结

以上是脚本宝典为你收集整理的APR not available全部内容,希望文章能够帮你解决APR not available所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: