Project: talendesb
Issue TESB-9642: Startup of BPM server breaks provider bundle startup claiming that connection to zookeeper is not authenticated and finally failing to create JMX connector
If you set up an environment with the BPM server started in the TESB provider instance, you will receive the following error and all services the provider bundle should start up will be missing: {panel:title=Error connecting to Zookeeper when BPM server is started} 09:22:26,874 | ERROR | xtenderThread-10 | ternal.SingleBusLocatorRegistrar 206 | 193 - locator - 5.3.1.SNAPSHOT | ServiceLocator Exception thrown during unregister endpoint. org.talend.esb.servicelocator.client.ServiceLocatorException: Connection to Service Locator failed. org.talend.esb.servicelocator.client.internal.zk.ZKBackend.connect(ZKBackend.java:84)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.client.internal.ServiceLocatorImpl.unregister(ServiceLocatorImpl.java:178)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.cxf.internal.SingleBusLocatorRegistrar.unregisterServer(SingleBusLocatorRegistrar.java:203)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.cxf.internal.SingleBusLocatorRegistrar.stopServer(SingleBusLocatorRegistrar.java:99)[193:locator:5.3.1.SNAPSHOT] org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.stopServer(ServerLifeCycleManagerImpl.java:67)[122:org.apache.cxf.cxf-rt-core:2.7.5] org.apache.cxf.endpoint.ServerImpl.stop(ServerImpl.java:166)[121:org.apache.cxf.cxf-api:2.7.5] org.apache.cxf.endpoint.ServerImpl.destroy(ServerImpl.java:181)[121:org.apache.cxf.cxf-api:2.7.5] org.apache.cxf.bus.managers.ServerRegistryImpl.preShutdown(ServerRegistryImpl.java:90)[122:org.apache.cxf.cxf-rt-core:2.7.5] org.apache.cxf.bus.managers.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:95)[122:org.apache.cxf.cxf-rt-core:2.7.5] org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:244)[122:org.apache.cxf.cxf-rt-core:2.7.5] org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:231)[122:org.apache.cxf.cxf-rt-core:2.7.5] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_10-ea] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_10-ea] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_10-ea] java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_10-ea] org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:300)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:226)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:500)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:476)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:445)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:368)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[115:org.springframework.osgi.extender:1.2.1] java.lang.Thread.run(Thread.java:722)[:1.7.0_10-ea] 09:22:26,875 | ERROR | d-10-EventThread | ternal.SingleBusLocatorRegistrar 189 | 193 - locator - 5.3.1.SNAPSHOT | ServiceLocator Exception thrown when registering for endpoint CXFEndpointProvider with address http://provider:9088/services/tesb.test.participants.osgi.ufp.provider/soap/StandardTestServiceProvider/LocatorFeature/ for service \{http://services.test.esb.talend.org/ufp/ufpService}ufpLocatorFeatureProvider org.talend.esb.servicelocator.client.ServiceLocatorException: The service locator server signaled an error. org.talend.esb.servicelocator.client.internal.zk.ZKBackend.locatorException(ZKBackend.java:371)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.client.internal.zk.ZKBackend.getContent(ZKBackend.java:201)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.client.internal.zk.EndpointNodeImpl.getContent(EndpointNodeImpl.java:68)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.client.internal.ServiceLocatorImpl.register(ServiceLocatorImpl.java:152)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.client.internal.ServiceLocatorImpl.register(ServiceLocatorImpl.java:128)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.cxf.internal.SingleBusLocatorRegistrar.registerServer(SingleBusLocatorRegistrar.java:186)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.cxf.internal.SingleBusLocatorRegistrar.process(SingleBusLocatorRegistrar.java:116)[193:locator:5.3.1.SNAPSHOT] org.talend.esb.servicelocator.client.internal.zk.ZKBackend$WatcherImpl.process(ZKBackend.java:401)[193:locator:5.3.1.SNAPSHOT] org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:526)[192:org.apache.hadoop.zookeeper:3.3.6] org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:502)[192:org.apache.hadoop.zookeeper:3.3.6] {color:red}Caused by: org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /cxf-locator/{http:%2F%2Fservices.test.esb.talend.org%2Fufp%2FufpService}ufpLocatorFeatureProvider/http:%2F%2Fprovider:9088%2Fservices%2Ftesb.test.participants.osgi.ufp.provider%2Fsoap%2FStandardTestServiceProvider%2FLocatorFeature%2F{color} org.apache.zookeeper.KeeperException.create(KeeperException.java:104)[192:org.apache.hadoop.zookeeper:3.3.6] org.apache.zookeeper.KeeperException.create(KeeperException.java:42)[192:org.apache.hadoop.zookeeper:3.3.6] org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:927)[192:org.apache.hadoop.zookeeper:3.3.6] org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:956)[192:org.apache.hadoop.zookeeper:3.3.6] org.talend.esb.servicelocator.client.internal.zk.ZKBackend.getContent(ZKBackend.java:194)[193:locator:5.3.1.SNAPSHOT]	... 8 more {panel} {panel:title=Failing to create JMX connector} {color:red}09:22:26,879 | ERROR | xtenderThread-10 | BundleApplicationContextListener 50 | 115 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=tesb.test.participants.osgi.ufp.provider, config=config/osgi.xml)) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in URL [bundleentry://269.fwk91112431/config/jmx.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://0.0.0.0:1101/ufpServiceProviderBeanConnector]: javax.naming.NoInitialContextException{color} org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:589)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)[110:org.springframework.context:3.1.4.RELEASE] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[114:org.springframework.osgi.core:1.2.1] org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[115:org.springframework.osgi.extender:1.2.1] java.lang.Thread.run(Thread.java:722)[:1.7.0_10-ea] Caused by: java.io.IOException: Cannot bind to URL [rmi://0.0.0.0:1101/ufpServiceProviderBeanConnector]: javax.naming.NoInitialContextException javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)[:1.7.0_10-ea] javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)[:1.7.0_10-ea] org.springframework.jmx.support.ConnectorServerFactoryBean.afterPropertiesSet(ConnectorServerFactoryBean.java:187)[110:org.springframework.context:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)[108:org.springframework.beans:3.1.4.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)[108:org.springframework.beans:3.1.4.RELEASE]	... 14 more {color:red}Caused by: javax.naming.NoInitialContextException org.apache.aries.jndi.DelegateContext.getDefaultContext(DelegateContext.java:233)[241:org.apache.aries.jndi:1.0.0] org.apache.aries.jndi.DelegateContext.getURLContext(DelegateContext.java:256)[241:org.apache.aries.jndi:1.0.0] org.apache.aries.jndi.DelegateContext.findContext(DelegateContext.java:214)[241:org.apache.aries.jndi:1.0.0] org.apache.aries.jndi.DelegateContext.bind(DelegateContext.java:82)[241:org.apache.aries.jndi:1.0.0] javax.naming.InitialContext.bind(InitialContext.java:419)[:1.7.0_10-ea] javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)[:1.7.0_10-ea] javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)[:1.7.0_10-ea]	... 17 more{color} {panel} *BUT* if you leave of the command 4.5 on the provider TESB (last {code}tbpm:start-server{code} command), then the provider bundle can be started up successfully
Story points: 1