Great! Thanks for the update Thanuja!

On Tuesday, May 10, 2016, Thanuja Uruththirakodeeswaran <thanu...@wso2.com>
wrote:

> Hi All,
>
> I have added the custom extension to wso2mb puppet module through
> 'system_file_list' method.
>
> Like we used file_list to copy files to wso2 carbon home, we can copy
> files which are added *<wso2-module>/files/system* to system using 
> *system_file_list
> *as below:
>
> wso2::system_file_list:
>   -
>     file: <file-name>
>     target_path: <target-path>
>
>
> I used the above approach to fix the MB thrift server issue.  Added
> wso2mb-default-init.sh extension script to wso2mb/files/system and copied
> to /usr/local/bin path using system_file_list as below:
>
> wso2::system_file_list:
>   -
>     file: wso2mb-default-init.sh
>     target_path: /usr/local/bin
>
>
>
> Thanks.
>
>
> On Mon, May 9, 2016 at 2:07 PM, Thanuja Uruththirakodeeswaran <
> thanu...@wso2.com <javascript:_e(%7B%7D,'cvml','thanu...@wso2.com');>>
> wrote:
>
>> Hi All,
>>
>> Thanks for the suggestions !!! As Isuru suggested, the best approach
>> would be to use an extension point to update thriftServerHost with
>> container ip. Will go with this approach.
>>
>> Thanks.
>>
>> On Mon, May 9, 2016 at 2:01 PM, Akila Ravihansa Perera <
>> raviha...@wso2.com <javascript:_e(%7B%7D,'cvml','raviha...@wso2.com');>>
>> wrote:
>>
>>> Hi Pumudu,
>>>
>>> We can't use "%{::ipaddress}" in kubernetes platform since Puppet is
>>> only used to build the Docker images. The ipaddress is assigned when the
>>> Kubernetes pods/services are deployed.
>>>
>>> I think best method would be to use the extension point as explained by
>>> Isuru. This should be similar to how we replace the localMemberHost section
>>> in axis2.xml.
>>>
>>> Thanks.
>>>
>>> On Mon, May 9, 2016 at 1:34 PM, Pumudu Ruhunage <pum...@wso2.com
>>> <javascript:_e(%7B%7D,'cvml','pum...@wso2.com');>> wrote:
>>>
>>>> Hi,
>>>> AFAIU, Thrift hostname should be changed to IP from puppet modules when
>>>> configuring hiera data[1]. Following line[2] should added to
>>>> default.yaml[3] to get the IP when initializing.
>>>>
>>>> [1]
>>>> https://github.com/wso2/puppet-modules/wiki/Creating-a-Puppet-Module-for-a-WSO2-Product#create-the-hiera-configuration-data-set
>>>> [2] wso2::mb_thrift_hostname : "%{::ipaddress}"
>>>> [3]
>>>> https://github.com/wso2/puppet-modules/blob/master/hieradata/dev/wso2/wso2mb/3.1.0/kubernetes/default.yaml
>>>>
>>>> Thanks,
>>>> Pumudu
>>>>
>>>> On Mon, May 9, 2016 at 12:08 PM, Akalanka Pagoda Arachchi <
>>>> darsha...@wso2.com <javascript:_e(%7B%7D,'cvml','darsha...@wso2.com');>
>>>> > wrote:
>>>>
>>>>> Hi Thanuja,
>>>>>
>>>>> As you have mentioned, the MB needs the IP address instead of the host
>>>>> name to configure the Thrift server. So you will have to correct the 
>>>>> thrift
>>>>> server connection details mentioned in "wso2mb-default/
>>>>> 10.100.186.164:7611".
>>>>>
>>>>> Thanks,
>>>>> Akalanka.
>>>>>
>>>>> On Mon, May 9, 2016 at 11:31 AM, Isuru Haththotuwa <isu...@wso2.com
>>>>> <javascript:_e(%7B%7D,'cvml','isu...@wso2.com');>> wrote:
>>>>>
>>>>>> 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 <
>>>>>> thanu...@wso2.com <javascript:_e(%7B%7D,'cvml','thanu...@wso2.com');>
>>>>>> > 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
>>>>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Darshana Akalanka Pagoda Arachchi,*
>>>>> *Software Engineer, WSO2*
>>>>> *+94777118016 <%2B94777118016>*
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Pumudu Ruhunage
>>>> Associate Software Engineer | WSO2 Inc
>>>> M: +94 779 664493  | http://wso2.com
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>
>>
>>
>> --
>> Thanuja Uruththirakodeeswaran
>> Software Engineer
>> WSO2 Inc.;http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 774363167
>>
>
>
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>


-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.io TW: @imesh
Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to