`
djsl6071
  • 浏览: 593386 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

Apache Tomcat Native library (zz)

阅读更多

启动Tomcat时出现The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

在从Tomcat 5.0.28转向5.5.X时,在启动时发现出现如下信息
[org.apache.catalina.core.AprLifecycleListener]-[INFO] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: (...你的系统环境PATH路径...)

在停止时发现出现如下信息
[org.apache.catalina.core.AprLifecycleListener]-[INFO] Failed shutdown of Apache Portable Runtime

于是,想消除这个问题,通过查阅 http://tomcat.apache.org/tomcat-5.5-doc/apr.html

Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).

These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.

发现 Tomcat 可以用 Apache Portable Runtime 来提供更强性能,提升Web静态页面的处理能力,不再需要专门的Web Server来处理静态页面了。

但是APR的支持需要安装三个本地组件
APR support requires three main native components to be installed:
1、APR library
2、JNI wrappers for APR used by Tomcat (libtcnative)
3、OpenSSL libraries

解决:Windows下的安装配置与使用
1、先去 http://tomcat.heanet.ie/native/ 下载编译好的 tcnative-1.dll 文件,也可以下载tomcat-native.zip自己进行编译
2、修改一下 catalina.bat,加上
  set CATALINA_OPTS="-Djava.library.path=../../APR/lib"
因为我把这个DLL放在与Tomcat目录同级的APR/lib目录下,所以采用了相对路径。或者把dll加到你的系统变量PATH里之类的,最简单的方法应当就是把tcnative-1.dll文件放在Tomcat的bin目录下:),或者直接这里C:\WINDOWS\system32

这样设置后,启动可以看到信息如下:
[org.apache.coyote.http11.Http11AprProtocol]-[INFO] Initializing Coyote HTTP/1.1 on http-9091
在停止时发现出现如下信息
[org.apache.coyote.http11.Http11AprProtocol]-[INFO] Pausing Coyote HTTP/1.1 on http-9091
......
[org.apache.coyote.http11.Http11AprProtocol]-[INFO] Stopping Coyote HTTP/1.1 on http-9091

这样就配置成功了。性能方面目前没有做详细的测试。
======================================================================
相关的文档参见
http://tomcat.apache.org/tomcat-5.5-doc/apr.html

相关的性能测试结果参见
http://www.javaworld.com.tw/jute/post/view?bid=9&id=139958&sty=3&age=0 

分享到:
评论

相关推荐

    启动tomcat出错The Apache Tomcat Native library which allows optimal performance in production environments was not found

    TOMCAT昨天突然自己宕掉服务了,怎么重起都不行,后来查看logs中catalina.out 日志发现如下错误 INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not ...

    The APR based Apache Tomcat Native library which allows optimal performance in p

    标题中的"The APR based Apache Tomcat Native library"是指Apache Portable Runtime(APR)库的一个组件,即Apache Tomcat Native库。这个库是专门为Apache Tomcat设计的,目的是为了提高其在处理网络I/O、系统调用...

    tomcat 启动报APR based Apache Tomcat Native library not found

    标题 "tomcat 启动报APR based Apache Tomcat Native library not found" 指出的问题是关于Apache Tomcat服务器在启动时找不到基于APR(Apache Portable Runtime)的本机库。这通常涉及到Tomcat使用APR库来提高性能...

    APR based Apache Tomcat Native library 1.1.14.

    综上所述,"APR based Apache Tomcat Native library 1.1.14"对于优化Apache Tomcat的性能、安全性和兼容性具有重要意义。开发者和系统管理员应当了解并掌握这些知识点,以便在实际环境中充分利用这个库的优势。

    tomcat-native-1.2.14-win64位-bin.zip

    解决tomcat 启动 An incompatible version [1.2.14] of the APR based Apache Tomcat Native library 错误,64BIN使用

    tomcat-native-1.2.34

    Apache Tomcat Native library 是一个重要的组件,主要用于增强Apache Tomcat服务器的功能。这个库提供了与操作系统更紧密集成的能力,特别是对于处理SSL/TLS连接时,它能够显著提高性能。标题"tomcat-native-1.2.34...

    Tomcat Native Liberay 文件

    The Apache Tomcat Native Liberay which allows optimal performance in production environments was not found on the java.library.path:E:\java\jdk1.5.0_05

    Tomcat 安装apr 支持 Tomcat Native

    标题"Tomcat 安装apr 支持 Tomcat Native"指的是在Apache Tomcat服务器上安装和配置Apache Portable Runtime (APR)库以启用Tomcat Native库的支持。Tomcat Native是一个可选的组件,它可以提供对操作系统级别的优化...

    tcnative-1.dll 1.2.18 32位64 位

    tcnative-1.dll 1.2.18 tomcat 启动报错 The APR based Apache Tomcat Native library which allows optimal performance in production 问题的解决需要这个,注意自己需要什么版本,之前下了1.2.14 显示版本不对:...

    tcnative-1.dll

    严重: An incompatible version 1.1.14 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 该资源为1.1.22版本,之后放到,tomcat/lib或者system32即可

    tcnative-1.dll 1.2.16下载 1.2.14可用

    An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14] 将文件放在:C:\Windows\System32 tcnative-1.dll 1.2.16下载 1.2.14...

    java源码:Tomcat 安装apr 支持 Tomcat Native.zip

    在Tomcat日志中,会有类似“Using APR based Apache Tomcat Native library”这样的信息。 通过启用Apr和Tomcat Native,你可以享受到以下优势: - **更高的性能**:由于可以直接调用操作系统API,Tomcat的网络I/O...

    tomcat5.5.20 native all library

    标题中的"tomcat5.5.20 native all library"指的是Tomcat服务器的5.5.20版本的本机库(Native Library)集合。在Apache Tomcat中,本机库是一个关键组件,它提供了与操作系统更直接交互的能力,尤其是对于处理SSL...

    tomcat启动的问题--apr

    信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jre1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\...

    tomcat-native-1.2.14-win32-64-bin

    《Apache Tomcat Native库详解与应用》 Apache Tomcat是一款广泛应用的开源Java Servlet容器,它为Java应用程序提供了运行环境。然而,在某些特定情况下,为了提高性能或者解决兼容性问题,可能需要引入Apache ...

    开发工具 apache-tomcat-8.0.41-windows-x86

    开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-...

    Apache Tomcat 7.0.90 发布,开源 Web 应用服务器

    Apache Tomcat 7.0.90 发布了...Update the packaged version of the Tomcat Native Library to 1.2.17 to pick up the latest Windows binaries built with APR 1.6.3 and OpenSSL 1.0.2o. 绿色版,免安装,放心使用

    Apache Tomcat 最新源代码

    Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache ...

    apache tomcat使用技巧

    Apache Tomcat 使用技巧 Apache Tomcat 是一个流行的开源 Web 服务器软件,广泛应用于 Web 应用程序的开发和部署中。使用 Apache Tomcat 能够帮助开发者快速搭建和部署 Web 应用程序,但新手可能不知道如何正确使用...

Global site tag (gtag.js) - Google Analytics