Further debugging reveals that the SpringSSLContext is parsed correctly from the activemq-broker.xml but during the binding process I found this:
org.apache.activemq.transport.TransportFactory public static TransportServer bind(BrokerService brokerService, URI location) throws IOException { TransportFactory tf = findTransportFactory(location); if( brokerService!=null && tf instanceof BrokerServiceAware ) { ((BrokerServiceAware)tf).setBrokerService(brokerService); } try { if( brokerService!=null ) { SslContext.setCurrentSslContext(brokerService.getSslContext()); } return tf.doBind(location); } finally { SslContext.setCurrentSslContext(null); } } org.apache.activemq.broker.SslContext static public void setCurrentSslContext(SslContext bs) { current.set(bs); } The TransportFactory calls setCurrentSslContext twice in which the second call sets the sslcontext to null. On Tue, 24 Apr 2012 09:43:03 -0500, Chris Odom <chris.o...@mediadriver.com> wrote: > Furthering debugging of the issue has revealed that the create > SslSocketConnector's sslContextFactory does not have the keyStore created > as in, its null. I have also noticed that when using either configuration > below the keyStorePassword is mucked up as well: > > <!-- SSL context used for both http(s) and ssl transport --> > <sslContext> > <sslContext keyStore="${karaf.home}/etc/jsse/localhost.ks" > keyStorePassword="changeit" /> > </sslContext> > > <!-- SSL context used for both http(s) and ssl transport --> > <sslContext> > <sslContext > keyStore="file:${karaf.home}/etc/jsse/localhost.ks" > keyStorePassword="changeit" /> > </sslContext> > > With the above listed configurations the keyStorePassword ends up being > just the letter 't' and not 'changeit'; > > I am currently using apache-servicemix-4.4.1-fuse-03-06 and any help in > this would be deeply appreciated. > > and yes the sslContext element is in A-Z order with in the broker element. > > Thanks > Chris O. > > > On Mon, 23 Apr 2012 17:30:52 -0500, Chris Odom > <chris.o...@mediadriver.com> > wrote: >> I am currently trying to setup both a https and ssl transport connector >> for the default broker. I am using servicemix deploying a blueprint > version >> of the activemq-broker.xml and have followed all how-to with no success. >> below is an excerpt of my broker.xml file for sslcontext configuration: >> >> >> When I start update servicemix with in the console I get prompted with >> "org.eclipse.jetty.ssl.password : " >> >> If you attempt to type something in >> by the 3 character it just returns with out hitting enter and prompts a >> second doing the exact same thing and then does not prompt any more. > With >> in the log file I see this after the second prompts occurs: >> >> 17:21:41,961 >> | WARN | rint Extender: 3 | log | ? ? | 80 - org.eclipse.jetty.util - >> 7.4.5.fuse20111017 | FAILED > Krb5AndCertsSslSocketConnector@localhost:8443 >> FAILED: java.lang.IllegalStateException: SSL context is not configured >> correctly. >> >> 17:21:41,961 | WARN | rint Extender: 3 | log | ? ? | 80 - >> org.eclipse.jetty.util - 7.4.5.fuse20111017 | FAILED >> org.eclipse.jetty.server.Server@2b76fbc2: > java.lang.IllegalStateException: >> SSL context is not configured correctly. >> >> 17:21:41,961 | ERROR | rint >> Extender: 3 | BrokerService | ? ? | 51 - > org.apache.activemq.activemq-core >> - 5.5.1.fuse-03-06 | Failed to start ActiveMQ JMS Message Broker > (default, >> null). Reason: java.lang.IllegalStateException: SSL context is not >> configured correctly. >> >> java.lang.IllegalStateException: SSL context is not >> configured correctly. >> >> at >> > org.eclipse.jetty.server.ssl.SslSocketConnector.doStart(SslSocketConnector.java:338) >> >> >> at >> > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) >> >> >> at org.eclipse.jetty.server.Server.doStart(Server.java:269) >> >> at >> > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) >> >> >> at >> > org.apache.activemq.transport.http.HttpTransportServer.doStart(HttpTransportServer.java:94) >> >> >> at >> > org.apache.activemq.transport.https.HttpsTransportServer.doStart(HttpsTransportServer.java:71) >> >> >> at >> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54) >> >> at >> > org.apache.activemq.broker.TransportConnector.start(TransportConnector.java:250) >> >> >> at >> > org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2206) >> >> >> at >> > org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2119) >> >> >> at >> org.apache.activemq.broker.BrokerService.start(BrokerService.java:538) >> >> >> at >> > org.apache.activemq.broker.BrokerService.autoStart(BrokerService.java:482) >> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> Method)[:1.6.0_26] >> >> at >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_26] >> >> >> at >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26] >> >> >> at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26] >> >> at >> > org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_26] >> >> >> at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26] >> >> >> at java.lang.Thread.run(Thread.java:662)[:1.6.0_26] >> >> 17:21:41,966 | >> INFO | rint Extender: 3 | BrokerService | ? ? | 51 - >> org.apache.activemq.activemq-core - 5.5.1.fuse-03-06 | ActiveMQ Message >> Broker (default, null) is shutting down >> >> 17:21:41,967 | INFO | rint >> Extender: 3 | log | ? ? | 80 - org.eclipse.jetty.util - > 7.4.5.fuse20111017 >> | stopped o.e.j.s.ServletContextHandler{/,null} >> >> 17:21:42,019 | INFO | >> rint Extender: 3 | TransportConnector | ? ? | 51 - >> org.apache.activemq.activemq-core - 5.5.1.fuse-03-06 | Connector jetty >> Stopped >> >> 17:21:42,019 | INFO | rint Extender: 3 | TransportConnector | ? ? >> | 51 - org.apache.activemq.activemq-core - 5.5.1.fuse-03-06 | Connector > ssl >> Stopped >> >> 17:21:42,019 | INFO | rint Extender: 3 | TransportConnector | ? ? >> | 51 - org.apache.activemq.activemq-core - 5.5.1.fuse-03-06 | Connector >> openwire Stopped >> >> 17:21:42,019 | INFO | rint Extender: 3 | >> TransportConnector | ? ? | 51 - org.apache.activemq.activemq-core - >> 5.5.1.fuse-03-06 | Connector stomp Stopped >> >> 17:21:42,023 | INFO | rint >> Extender: 3 | KahaDBStore | ? ? | 51 - org.apache.activemq.activemq-core > - >> 5.5.1.fuse-03-06 | Stopping async queue tasks >> >> 17:21:42,023 | INFO | rint >> Extender: 3 | KahaDBStore | ? ? | 51 - org.apache.activemq.activemq-core > - >> 5.5.1.fuse-03-06 | Stopping async topic tasks >> >> 17:21:42,023 | INFO | rint >> Extender: 3 | KahaDBStore | ? ? | 51 - org.apache.activemq.activemq-core > - >> 5.5.1.fuse-03-06 | Stopped KahaDB >> >> 17:21:42,318 | INFO | rint Extender: 3 >> | BrokerService | ? ? | 51 - org.apache.activemq.activemq-core - >> 5.5.1.fuse-03-06 | ActiveMQ JMS Message Broker (default, null) stopped >> >> >> 17:21:42,319 | ERROR | rint Extender: 3 | BlueprintContainerImpl | ? ? | >> 10 - org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint >> container for bundle activemq-broker.xml >> >> >> org.osgi.service.blueprint.container.ComponentDefinitionException: > Unable >> to intialize bean .component-2 >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_26] >> >> >> at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26] >> >> >> at >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26] >> >> >> at java.lang.Thread.run(Thread.java:662)[:1.6.0_26] >> >> Caused by: >> java.lang.IllegalStateException: SSL context is not configured > correctly. >> >> >> at >> > org.eclipse.jetty.server.ssl.SslSocketConnector.doStart(SslSocketConnector.java:338) >> >> >> at >> > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) >> >> >> at org.eclipse.jetty.server.Server.doStart(Server.java:269) >> >> at >> > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) >> >> >> at >> > org.apache.activemq.transport.http.HttpTransportServer.doStart(HttpTransportServer.java:94) >> >> >> at >> > org.apache.activemq.transport.https.HttpsTransportServer.doStart(HttpsTransportServer.java:71) >> >> >> at >> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54) >> >> at >> > org.apache.activemq.broker.TransportConnector.start(TransportConnector.java:250) >> >> >> at >> > org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2206) >> >> >> at >> > org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2119) >> >> >> at >> org.apache.activemq.broker.BrokerService.start(BrokerService.java:538) >> >> >> at >> > org.apache.activemq.broker.BrokerService.autoStart(BrokerService.java:482) >> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> Method)[:1.6.0_26] >> >> at >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_26] >> >> >> at >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26] >> >> >> at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26] >> >> at >> > org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[10:org.apache.aries.blueprint:0.3.1] >> >> >> at >> > org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)[10:org.apache.aries.blueprint:0.3.1] >> >> >> ... 15 more Any ideas on why this is happening or why this would occur >> would be deeply appreciated. -- Thanks, Chris Odom 512:799-0270