Java 启动 Tomcat 未能初始化与 ProtocolHandler 关联的端点
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21766491/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Starting Tomcat Failed to initialize end point associated with ProtocolHandler
提问by CIOC
I'm trying to start a tomcat instance(the only tomcat I have), and I'm getting some weird problems, I know that this error:
我正在尝试启动一个 tomcat 实例(我唯一的 tomcat),但遇到了一些奇怪的问题,我知道这个错误:
Failed to initialize end point associated with ProtocolHandler
无法初始化与 ProtocolHandler 关联的端点
is because some other application is using the same port, but if I change the port in the server.xmland run the startup.batagain I get the same error but now pointing to the new port, every time y change it I get the same error, also I check for other apps listening the same port using the command netstat -ano | find "9080", I tried this on 3 different machines (2 win7, 1 win server 2008), has anyone faced this problem before?
是因为其他一些应用程序正在使用相同的端口,但是如果我更改server.xml 中的端口并再次运行startup.bat我得到相同的错误但现在指向新端口,每次更改它我都会得到同样的错误,我还使用命令netstat -ano |检查侦听同一端口的其他应用程序 找到“9080”,我在 3 台不同的机器(2 台 win7,1 台 win server 2008)上尝试过,以前有人遇到过这个问题吗?
Feb 13, 2014 1:25:22 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-9080"] Feb 13, 2014 1:25:22 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-9443"] Feb 13, 2014 1:25:23 PM org.apache.coyote.AbstractProtocol init SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-9443"] Throwable occurred: java.io.IOException: ${jazz.connector.sslProtocol} SSLContext not available at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:475) ...
2014 年 2 月 13 日下午 1:25:22 org.apache.coyote.AbstractProtocol init INFO:初始化 ProtocolHandler ["http-bio-9080"] 2014 年 2 月 13 日下午 1:25:22 org.apache.coyote.AbstractProtocol init INFO :初始化 ProtocolHandler ["http-bio-9443"] 2014 年 2 月 13 日下午 1:25:23 org.apache.coyote.AbstractProtocol init 严重:无法初始化与 ProtocolHandler ["http-bio-9443"] 关联的端点发生:java.io.IOException: ${jazz.connector.sslProtocol} SSLContext 在 org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:475) 上不可用...
Thanks
谢谢
回答by Laxman G
I have refer this pageto configure https (SSL ) for my local tomcat or tomcat in my eclipse.
我已参考此页面为我的本地 tomcat 或 eclipse 中的 tomcat 配置 https (SSL)。
After doing 3 steps mention above link, When i am trying to start my server I got below Exception during startup:
完成上面链接中提到的 3 个步骤后,当我尝试启动服务器时,在启动过程中出现以下异常:
SEVERE: Failed to initialize end point associated with ProtocolHandler [http-bi o-8443] java.io.IOException: Cannot recover key at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:54
4)
SEVERE: Failed to initialize end point associated with ProtocolHandler [http-bi o-8443] java.io.IOException: Cannot recover key at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:54
4)
Because it related with below exception :
因为它与以下异常有关:
java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772)
Problem is when i try to change server.xml i did not supply correct password value on keystorePass
and keyPass
as below.
When i am generating keystore using below command I have entered changeitas password for keystore. But when i am configuring in server.xml file for https i was supplying different password.
问题是当我尝试更改 server.xml 时,我没有提供正确的密码值keystorePass
,keyPass
如下所示。当我使用以下命令生成密钥库时,我输入了changeit作为密钥库的密码。但是当我在 server.xml 文件中为 https 进行配置时,我提供了不同的密码。
Command : $Tomcat\bin>keytool -genkey -alias mkyong -keyalg RSA -keystore c:\mkyongkeystore
命令 : $Tomcat\bin>keytool -genkey -alias mkyong -keyalg RSA -keystore c:\mkyongkeystore
I was having this
我有这个
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:\mkyongkeystore"
keystorePass="password" />
I change to
我改为
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="conf/srccodes.jks"
keystoreType="JKS"
keystorePass="changeit"
keyPass="changeit" />
It worked for me.
它对我有用。