tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim McCune" <...@mccune.name>
Subject Re: NIO connector gives "Invalid keystore format"
Date Thu, 11 Sep 2008 08:13:17 GMT
Hmm, I just tried converting the keystore to JKS (using
org.mortbay.util.PKCS12Import) and that worked.  So the JKS keystore seems
to work fine with the NIO connector, but the PKCS12 keystore only works with
non-NIO.

On 9/11/08, Tim McCune <tim@mccune.name> wrote:
>
> I've been using the NIO connector for a while now for HTTP.  Now I'm adding
> an SSL connector, and as long as I don't use NIO, everything is working
> fine:
>
> <Connector port="8443"
>             SSLEnabled="true"
>             scheme="https" secure="true"
>             clientAuth="false" sslProtocol="TLS"
>
> keystoreFile="/usr/local/jboss/server/default/conf/tomcat.keystore"
>             keystorePass="xxx"
>             keystoreType="PKCS12"
>             />
>
> However, as soon as I add the following attribute to the Connector element:
>
> protocol="org.apache.coyote.http11.Http11NioProtocol"
>
> when Tomcat (JBoss) starts up, it throws an IOException: Invalid keystore
> format:
>
> ERROR [org.apache.coyote.http11.Http11NioProtocol] (main) Error
> initializing endpoint
> ^[[0;37mjava.io.IOException: Invalid keystore format
>   at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633)
>   at
> sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
>   at java.security.KeyStore.load(KeyStore.java:1185)
>   at org.apache.tomcat.util.net.NioEndpoint.init(NioEndpoint.java:739)
>   at
> org.apache.coyote.http11.Http11NioProtocol.init(Http11NioProtocol.java:135)
>   at
> org.apache.catalina.connector.Connector.initialize(Connector.java:1073)
>   at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:668)
>   at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
>   at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
>   at org.apache.catalina.startup.Catalina.start(Catalina.java:568)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
>   at
> org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.web.tomcat.service.JBossWeb.startService(JBossWeb.java:440)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
>   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>   at
> org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
>   at
> org.jboss.deployment.SubDeployerInterceptor.invokeNext(SubDeployerInterceptor.java:124)
>   at
> org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:109)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
>   at $Proxy0.start(Unknown Source)
>   at org.jboss.system.ServiceController.start(ServiceController.java:417)
>   at org.jboss.system.ServiceController.start(ServiceController.java:435)
>   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy4.start(Unknown Source)
>   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
>   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy9.deploy(Unknown Source)
>   at
> org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
>   at
> org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
>   at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
>   at
> org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
>   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
>   at $Proxy0.start(Unknown Source)
>   at org.jboss.system.ServiceController.start(ServiceController.java:417)
>   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy4.start(Unknown Source)
>   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
>   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy5.deploy(Unknown Source)
>   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
>   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
>   at org.jboss.Main.boot(Main.java:200)
>   at org.jboss.Main$1.run(Main.java:508)
>   at java.lang.Thread.run(Thread.java:619)
> ERROR [org.apache.catalina.startup.Catalina] (main) Catalina.start
> LifecycleException:  Protocol handler initialization failed:
> java.io.IOException: Invalid keystore format
>   at
> org.apache.catalina.connector.Connector.initialize(Connector.java:1075)
>   at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:668)
>   at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
>   at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
>   at org.apache.catalina.startup.Catalina.start(Catalina.java:568)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
>   at
> org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.web.tomcat.service.JBossWeb.startService(JBossWeb.java:440)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
>   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>   at
> org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
>   at
> org.jboss.deployment.SubDeployerInterceptor.invokeNext(SubDeployerInterceptor.java:124)
>   at
> org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:109)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
>   at $Proxy0.start(Unknown Source)
>   at org.jboss.system.ServiceController.start(ServiceController.java:417)
>   at org.jboss.system.ServiceController.start(ServiceController.java:435)
>   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy4.start(Unknown Source)
>   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
>   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
>   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy9.deploy(Unknown Source)
>   at
> org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
>   at
> org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
>   at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
>   at
> org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
>   at
> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
>   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
>   at $Proxy0.start(Unknown Source)
>   at org.jboss.system.ServiceController.start(ServiceController.java:417)
>   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy4.start(Unknown Source)
>   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
>   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
>   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>   at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>   at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
>   at $Proxy5.deploy(Unknown Source)
>   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
>   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
>   at org.jboss.Main.boot(Main.java:200)
>   at org.jboss.Main$1.run(Main.java:508)
>   at java.lang.Thread.run(Thread.java:619)
>
> Any idea what I'm doing wrong?  I'm just following the example listed at
> http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html (or at least I'm
> trying to.) :)
>
> Thanks.
>
> --Tim
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message