Tomcat 7 未启动。无法初始化与 ProtocolHandler 关联的端点

Tomcat 7 未启动。无法初始化与 ProtocolHandler 关联的端点

当我尝试使用带有 Java 1.6.0_05 的 startup.bat 运行 Tomcat 7 时,它正常工作。如果我将版本更改为 jdk1.6.0_45 或 jdk1.7.0_65,它会出错。这似乎是 Java 版本出了问题,但我不知道可能是什么原因。

C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\bin>java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
This is working  fine.




But in case I change the jdk to jdk1.6.0_45 or jdk1.7.0_65. 
C:\Users\mbanerjee>java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Tomcat 7 is no more starting. It is giving exception.


Jul 15, 2014 11:21:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.30 using APR version 1.4.8.
Jul 15, 2014 11:21:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1g 7 Apr 2014)
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-apr-7733"]
org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.  
    at org.apache.tomcat.jni.Socket.create(Native Method)
    at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)

Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-7733]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-7733]]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    ... 12 more
Caused by: org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.  
    at org.apache.tomcat.jni.Socket.create(Native Method)
    at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
    ... 13 more

Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["ajp-apr-8009"]
org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.  
    at org.apache.tomcat.jni.Socket.create(Native Method)
    at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)

Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    ... 12 more
Caused by: org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.  
    at org.apache.tomcat.jni.Socket.create(Native Method)
    at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
    ... 13 more

Jul 15, 2014 11:21:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2310 ms
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Jul 15, 2014 11:21:10 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\docs
Jul 15, 2014 11:21:12 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [739] milliseconds.
Jul 15, 2014 11:21:12 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\docs has finished in 1,618 ms
Jul 15, 2014 11:21:12 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\examples
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\examples has finished in 977 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\host-manager
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\host-manager has finished in 112 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\manager
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\manager has finished in 114 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\ROOT
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\ROOT has finished in 90 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3007 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]: 
java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
    at java.net.ServerSocket.createImpl(ServerSocket.java:308)
    at java.net.ServerSocket.getImpl(ServerSocket.java:257)
    at java.net.ServerSocket.bind(ServerSocket.java:376)
    at java.net.ServerSocket.<init>(ServerSocket.java:237)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:426)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:777)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:723)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-apr-8009"]
Jul 15, 2014 11:21:13 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-apr-8009"]
What can be the probable reason for this issue? I looked at many forums but did not get any solution for it .

Any help will be really appreciated.

答案1

嗯,很明显你不能初始化 APR。这就是它给你的全部。

与所有 Java 产品一样,您只需进行“故障排除”即可,直到其正常工作。

有可能您没有安装 APR(通常称为 tomcat-native 或类似的),或者您安装的 APR 库与系统的其余部分存在二进制兼容性问题,或者它已安装但不知何故损坏;请注意它在调用本机方法时是如何失败的。

您收到的套接字错误的 MSDN 描述可能会有用:

无法加载或初始化请求的服务提供程序。如果无法加载服务提供程序的 DLL(LoadLibrary 失败)或提供程序的 WSPStartup 或 NSPStartup 函数失败,则会返回此错误。

如果你不知道如何为 Windows 制作 APR,文档是一个很好的开始

相关内容