启动Tomcat失败,无法初始化与ProtocolHandler关联的端点

时间:2022-09-14 18:12:46

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.xml and run the startup.bat again 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?

因为其他应用程序正在使用相同的端口,但是如果我更改服务器中的端口。xml并运行启动。蝙蝠再次得到同样的错误但是现在指向新港口,每次y改变它我得到同样的错误,我也检查其他应用程序听相同的端口使用命令netstat另|发现“9080”,我试着在3个不同的机器上(2008年2这个主题,1赢得服务器),有人遇到过这个问题吗?

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初始化协议处理程序["http-生物-9080"]2014年2月13日下午1:25:22 org.apache.coyote。初始化协议处理程序[“http-bio-9443”],2014年2月13日,下午1:25 . 23。AbstractProtocol init:初始化与ProtocolHandler[“http-bio-9443”]关联的端点失败:java.io。IOException:$ { jazz.connector。sslProtocol} SSLContext在org.apache.tomcat.util.net. jssesocketfactory .init(JSSESocketFactory.java:475)中不可用。

Thanks

谢谢

1 个解决方案

#1


0  

I have refer this page to configure https (SSL ) for my local tomcat or tomcat in my eclipse.

我已经在eclipse中为本地tomcat或tomcat配置https (SSL)。

After doing 3 steps mention above link, When i am trying to start my server I got below Exception during startup:

当我尝试启动我的服务器时,当我尝试启动我的服务器时,我在启动过程中遇到了以下的异常:

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:544)

严重:未能初始化与协议处理程序[http-bi -8443] java.io关联的端点。IOException:无法在org.apache.tomcat.util.net. jssesocketfactory .init(JSSESocketFactory.java:544)恢复密钥。

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 changeit as password for keystore. But when i am configuring in server.xml file for https i was supplying different password.

问题是当我尝试更改服务器时。我没有在keystorePass和keyPass上提供正确的密码值,如下所示。当我使用下面的命令生成密钥存储时,我输入了changeit作为密钥存储的密码。但是当我在服务器中配置时。https i的xml文件提供了不同的密码。

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.

它为我工作。

#1


0  

I have refer this page to configure https (SSL ) for my local tomcat or tomcat in my eclipse.

我已经在eclipse中为本地tomcat或tomcat配置https (SSL)。

After doing 3 steps mention above link, When i am trying to start my server I got below Exception during startup:

当我尝试启动我的服务器时,当我尝试启动我的服务器时,我在启动过程中遇到了以下的异常:

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:544)

严重:未能初始化与协议处理程序[http-bi -8443] java.io关联的端点。IOException:无法在org.apache.tomcat.util.net. jssesocketfactory .init(JSSESocketFactory.java:544)恢复密钥。

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 changeit as password for keystore. But when i am configuring in server.xml file for https i was supplying different password.

问题是当我尝试更改服务器时。我没有在keystorePass和keyPass上提供正确的密码值,如下所示。当我使用下面的命令生成密钥存储时,我输入了changeit作为密钥存储的密码。但是当我在服务器中配置时。https i的xml文件提供了不同的密码。

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.

它为我工作。