我试图配置Apache Tomcat以使用带有SSL的本机APR连接器。我有一个由证书颁发机构签名的证书。该证书是PEM编码的。
但Tomcat挂起了APR连接初始化。
这是我的server.xml:
<Connector port="80"
protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
compression="on" />
<Connector port="8443"
protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="200"
scheme="https"
secure="true"
SSLEnabled="true"
SSLCertificateFile="D:\certificates\myCertificate.crt"
SSLCertificateKeyFile="D:\certificates\myCertificatePrivateKey.crt"
SSLPassword="myPassword"
SSLVerifyClient="false"/>
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Tomcat的日志文件:
2015-01-27 18:10:13 Commons Daemon procrun stderr initialized
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.57
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Nov 3 2014 08:39:16 UTC
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.57.0
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows Server 2012
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.2
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME: C:\Program Files\Java\jre1.8.0_25
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_25-b18
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: D:\Q-DAS\chy.stat\tomcat
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: D:\Q-DAS\chy.stat\tomcat
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dsmartstat.home=D:\Q-DAS\chy.stat
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=D:\Q-DAS\chy.stat\tomcat
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:\Q-DAS\chy.stat\tomcat
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=D:\Q-DAS\chy.stat\tomcat\endorsed
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=D:\Q-DAS\chy.stat\tomcat\temp
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=D:\Q-DAS\chy.stat\tomcat\conf\logging.properties
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -XX:+HeapDumpOnOutOfMemoryError
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -XX:HeapDumpPath=D:\Q-DAS\chy.stat\heapDumps
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.port=20001
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.authenticate=true
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.ssl=true
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: exit
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xms128m
Led 27, 2015 6:10:14 ODP. org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xmx1024m
Led 27, 2015 6:10:14 ODP. org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
Led 27, 2015 6:10:14 ODP. org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Led 27, 2015 6:10:15 ODP. org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1j 15 Oct 2014)
Led 27, 2015 6:10:15 ODP. org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-80"]
Led 27, 2015 6:10:15 ODP. org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8443"]
这是线程转储:
Attaching to process ID 5324, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.25-b02
Deadlock Detection:
No deadlocks found.
Thread 19: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- sun.misc.GC$Daemon.run() @bci=51 (Interpreted frame)
Thread 17: (state = IN_NATIVE)
- java.net.DualStackPlainSocketImpl.accept0(int, java.net.InetSocketAddress[]) @bci=0 (Interpreted frame)
- java.net.DualStackPlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=37 (Interpreted frame)
- java.net.AbstractPlainSocketImpl.accept(java.net.SocketImpl) @bci=7 (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=42 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=60 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48 (Interpreted frame)
- sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept() @bci=1 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop() @bci=55 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run() @bci=1 (Interpreted frame)
- java.lang.Thread.run() @bci=11 (Interpreted frame)
Thread 16: (state = IN_NATIVE)
- java.net.DualStackPlainSocketImpl.accept0(int, java.net.InetSocketAddress[]) @bci=0 (Interpreted frame)
- java.net.DualStackPlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=37 (Interpreted frame)
- java.net.AbstractPlainSocketImpl.accept(java.net.SocketImpl) @bci=7 (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=42 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=60 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop() @bci=55 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run() @bci=1 (Interpreted frame)
- java.lang.Thread.run() @bci=11 (Interpreted frame)
Thread 15: (state = IN_NATIVE)
- java.net.DualStackPlainSocketImpl.accept0(int, java.net.InetSocketAddress[]) @bci=0 (Interpreted frame)
- java.net.DualStackPlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=37 (Interpreted frame)
- java.net.AbstractPlainSocketImpl.accept(java.net.SocketImpl) @bci=7 (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=42 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=60 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48 (Interpreted frame)
- javax.rmi.ssl.SslRMIServerSocketFactory$1.accept() @bci=1 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop() @bci=55 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run() @bci=1 (Interpreted frame)
- java.lang.Thread.run() @bci=11 (Interpreted frame)
Thread 11: (state = BLOCKED)
Thread 10: (state = BLOCKED)
Thread 9: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2 (Interpreted frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=36 (Interpreted frame)
Thread 8: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2 (Interpreted frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=36 (Interpreted frame)
Thread 4: (state = IN_NATIVE)
- org.apache.tomcat.jni.SSLContext.setCertificate(long, java.lang.String, java.lang.String, java.lang.String, int) @bci=0 (Interpreted frame)
- org.apache.tomcat.util.net.AprEndpoint.bind() @bci=894, line=586 (Interpreted frame)
- org.apache.tomcat.util.net.AbstractEndpoint.init() @bci=8, line=646 (Interpreted frame)
- org.apache.coyote.AbstractProtocol.init() @bci=274, line=434 (Interpreted frame)
- org.apache.catalina.connector.Connector.initInternal() @bci=94, line=978 (Interpreted frame)
- org.apache.catalina.util.LifecycleBase.init() @bci=29, line=102 (Interpreted frame)
- org.apache.catalina.core.StandardService.initInternal() @bci=105, line=559 (Interpreted frame)
- org.apache.catalina.util.LifecycleBase.init() @bci=29, line=102 (Interpreted frame)
- org.apache.catalina.core.StandardServer.initInternal() @bci=212, line=821 (Interpreted frame)
- org.apache.catalina.util.LifecycleBase.init() @bci=29, line=102 (Interpreted frame)
- org.apache.catalina.startup.Catalina.load() @bci=573, line=638 (Interpreted frame)
- org.apache.catalina.startup.Catalina.load(java.lang.String[]) @bci=9, line=663 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=100 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56 (Interpreted frame)
- org.apache.catalina.startup.Bootstrap.load(java.lang.String[]) @bci=104, line=280 (Interpreted frame)
- org.apache.catalina.startup.Bootstrap.main(java.lang.String[]) @bci=144, line=454 (Interpreted frame)
这里出了什么问题?
答案 0 :(得分:1)
您是否检查过您的私钥不需要密码?
我今天刚遇到这个问题
我使用OpenSSL删除了密码:openssl rsa -in privateKey.pem -out newPrivateKey.pem