Hi Thanuja,

There is an extension point [1] in the startup script for Dockerfiles,
where is looks for another script with a particular name format to execute
before starting the server. You should b able to use that to do a find
replace in the broker.xml with the container IP.

[1].
https://github.com/wso2/dockerfiles/blob/master/common/scripts/entrypoint.sh#L87

[2]. docker-<product_name>-<profile_name>-init.sh

On Mon, May 9, 2016 at 11:15 AM, Thanuja Uruththirakodeeswaran <
[email protected]> wrote:

> Hi All,
>
> When we try to run WSO2 MB docker image build using puppet provisioning
> with clustering enabled in kubernetes, I'm getting the below error  at the
> server startup:
>
> TID: [-1234] [] [2016-05-09 05:39:06,811] ERROR
> {org.wso2.andes.server.Main} -  Exception during startup. Triggering
> shutdown  {org.wso2.andes.server.Main}
> org.wso2.andes.kernel.AndesException: Unable to initialise application
> registry
> at org.wso2.andes.server.Broker.startupImpl(Broker.java:308)
> at org.wso2.andes.server.Broker.startup(Broker.java:110)
> at org.wso2.andes.server.Main.startBroker(Main.java:217)
> at org.wso2.andes.server.Main.execute(Main.java:206)
> at org.wso2.andes.server.Main.<init>(Main.java:54)
> at org.wso2.andes.server.Main.main(Main.java:47)
> at
> org.wso2.carbon.andes.internal.QpidServiceComponent.startAndesBroker(QpidServiceComponent.java:391)
> at
> org.wso2.carbon.andes.internal.QpidServiceComponent.setHazelcastInstance(QpidServiceComponent.java:250)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:430)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.dynamicBind(InstanceProcess.java:416)
> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:334)
> at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
> at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:950)
> at
> org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent.init(HazelcastClusteringAgent.java:258)
> at
> org.wso2.carbon.core.util.ClusteringUtil.enableClustering(ClusteringUtil.java:38)
> at
> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:177)
> at
> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:288)
> at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
> at
> org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.registerThrottlingAgent(ThrottlingAgentServiceComponent.java:123)
> at
> org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.activate(ThrottlingAgentServiceComponent.java:100)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
> at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
> at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
> at
> org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:514)
> at
> org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
> at
> org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> Caused by: org.wso2.andes.kernel.AndesException: Cannot start Thrift
> server on port 7611 on host wso2mb-default
> at org.wso2.andes.thrift.MBThriftServer.start(MBThriftServer.java:87)
> at
> org.wso2.andes.kernel.AndesKernelBoot.startThriftServer(AndesKernelBoot.java:440)
> at
> org.wso2.andes.kernel.AndesKernelBoot.initializeComponents(AndesKernelBoot.java:93)
> at org.wso2.andes.server.Broker.startupImpl(Broker.java:293)
> ... 70 more
> Caused by: org.apache.thrift.transport.TTransportException: Could not
> create ServerSocket on address wso2mb-default/10.100.186.164:7611.
> at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:109)
> at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:91)
> at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:87)
> at org.wso2.andes.thrift.MBThriftServer.start(MBThriftServer.java:75)
> ... 73 more
> TID: [-1234] [] [2016-05-09 05:39:06,816]  INFO
> {org.wso2.andes.server.registry.ApplicationRegistry} -  Shutting down
> ApplicationRegistry(org.wso2.andes.server.registry.ConfigurationFileApplicationRegistry@70194966)
> {org.wso2.andes.server.registry.ApplicationRegistry}
>
>
> It's because currently  'thriftServerHost' is set to hostname in
> broker.xml [1] and according to MB clustering guide [2] , this should be
> set to MB node (docker container) IP which hosts the Thrift Server.
>
> If it's correct, what will be the best approach to update the
> 'thriftServerHost' value with container IP?
>
> Please give your suggestions.
>
> [1].
> https://github.com/wso2/puppet-modules/blob/master/modules/wso2mb/templates/3.1.0/repository/conf/broker.xml.erb#L37
> [2]. https://docs.wso2.com/display/CLUSTER44x/Configuring+the+Broker+Nodes
>
>
> Thanks.
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>



-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to