You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Athanasios Tsitsipas <at...@uni-ulm.de> on 2015/06/03 15:53:35 UTC

How to use the Load Balancer with openstack

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the
files. More or less we can create many cartridges and use them with
applications. But we need a load balancer now connected with a ghost
application integrated with nodejs. What is the lb module in the puppet
master modules and what is the haproxy. How we will subscribe the
application we need to the load balancer and access the load balancer and
redirect us to the  multiple instances of the application above. Is there
any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas


Re: How to use the Load Balancer with openstack

Posted by David Hbase <da...@gmail.com>.
Hi, Dev

Need get a configuration guide for the Stratos LB. Especially, if we need
to scaling/LB the WSO2IS, WSO2BAM, WSO2USE separately with only ONE Stratos
LB.

Thanks
David

On Sun, Jun 7, 2015 at 7:37 AM, Gayan Gunarathne <ga...@wso2.com> wrote:

> Hi,
>
> On Sun, Jun 7, 2015 at 6:03 PM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
>> Hi Gayan,
>>
>>
>>
>> Excuse me for the massive mails.
>>
>> I fixed the problem with the unknown 7811 port. In thrift-client-config.xml
>> of lb module it was defind as port the 7711 and maybe the https somehow it
>> is configured at the next port 7811. If I define as port the 7611 and
>> secure port 7711, everything works! I don’t get any error.
>>
> Great! It is a pleasure to hear that.Yeah usually thrift port is 7611 and
> SSL thrift port will be 7711.
>
>
>> Still, the
>>     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
>> \
>>
>> Is not filled in the stratos.sh. Even if you changed it in the template.
>> It seems that it uses the arguments from the stratos.bat or something
>> else???
>>
>> Also, in the init.pp the push templates doesn’t push the stratos.sh.erb :/
>>
>
> Thanks for reporting this.IMO we need to push the Stratos.sh with puppet
> as we done for other modules.
>
>>
>>
>> Thank you for your time.
>>
>>
>>
>> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de]
>> *Sent:* Sunday, June 7, 2015 11:07 AM
>>
>> *To:* dev@stratos.apache.org
>> *Subject:* RE: How to use the Load Balancer with openstack
>>
>>
>>
>> At the thrift-client-config.xml there is a configuration for the client.
>> Which ip and port should I include. By default in the zip file it has:
>>
>>
>>
>> <!-- Apache thrift client configuration for publishing statistics to WSO2
>> CEP -->
>>
>> <thriftClientConfiguration>
>>
>>     <username>admin</username>
>>
>>     <password>admin</password>
>>
>>     <ip>localhost</ip>
>>
>>     <port>7711</port>
>>
>> </thriftClientConfiguration>
>>
>>
>>
>> At the nginx extention parameters it has also these arguments in the
>> nginx-extension.sh
>>
>>             -Dthrift.receiver.ip= <>
>>
>>             -Dthrift.receiver.port=7711
>>
>>
>>
>> What should I do? And where I can specify these ports for thrift.
>>
>>
>>
>> Also the template stratos.sh.erb is not used it seems that it takes the
>> parameters from the stratos.bat. Can you check the file at the end, there
>> are some syntax errors probably.
>>
>>
>>
>> Regards,
>>
>> Thanos
>>
>>
>>
>>
>>
>>
>>
>> *From:* Gayan Gunarathne [mailto:gayang@wso2.com <ga...@wso2.com>]
>> *Sent:* Sunday, June 7, 2015 7:21 AM
>> *To:* dev@stratos.apache.org
>> *Subject:* Re: How to use the Load Balancer with openstack
>>
>>
>>
>> Hi,
>>
>>
>>
>> On Sun, Jun 7, 2015 at 4:45 AM, Athanasios Tsitsipas <
>> athanasios.tsitsipas@uni-ulm.de> wrote:
>>
>> I had success with the nginx eventually.
>>
>>
>>
>> Glad to hear that you have success with the nginx.
>>
>>
>>
>> But now with the puppet module of stratos load balancer. I think there is
>> a problem:
>>
>>
>>
>> In the stratos.sh on the spawned vm of load balancer under the folder
>> /mnt/ …. , where the zip file of lb is unzip it misses the
>>
>>
>>
>>     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
>> \
>>
>>
>>
>> A line that I get an error for! In the zip file at puppet master this
>> line exists, but not in the spawned vm. Can we get a workaround for this?
>>
>> We need to add that property to the stratos.sh.erb of load balancer
>> puppet module. Now I have added that system property to the
>> https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.[1]
>>
>>
>>
>>  [1]
>> https://git1-us-west.apache.org/repos/asf?p=stratos.git;a=blob;f=tools/puppet3/modules/lb/templates/bin/stratos.sh.erb;hb=2b7a104c
>>
>>
>>
>> Regards,
>>
>> Thanos
>>
>>
>>
>>
>>
>> P.s the error I get is the following
>>
>> TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL
>> {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -
>> Failed to activate load balancer service component
>>
>> java.lang.RuntimeException: Thrift client configuration file path system
>> property is not set: thrift.client.config.file.path
>>
>>         at
>> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)
>>
>>         at
>> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)
>>
>>         at
>> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)
>>
>>         at
>> org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)
>>
>>         at
>> org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)
>>
>>         at
>> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)
>>
>>         at
>> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)
>>
>>         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:347)
>>
>>         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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)
>>
>>         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:347)
>>
>>         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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)
>>
>>         at
>> org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)
>>
>>         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:347)
>>
>>         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:517)
>>
>>         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)
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de]
>> *Sent:* Saturday, June 6, 2015 4:06 PM
>> *To:* dev@stratos.apache.org
>> *Subject:* RE: How to use the Load Balancer with openstack
>>
>>
>>
>> Hi I did that, right now. I installed the nginx to Ubuntu and provided
>> the executable path(/usr/sbin/nginx).
>>
>> If only download the distribution of nginx somehow I need to compile the
>> code right?There is no executable file in it. I downloaded the distribution
>> from this link: http://nginx.org/en/download.html.
>>
>>
>>
>> I’m getting this error now:
>>
>>
>>
>> [2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx
>> configuration...
>>
>> [2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file:
>> /tmp/nginx.cfg
>>
>> [2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...
>>
>> [2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance
>>
>> [2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start
>> load balancer
>>
>> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
>> java.lang.RuntimeException: Command execution failed:
>>
>> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>>
>>
>>
>>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>>
>>         at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>>
>>         at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>>
>>         at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>>
>>         at
>> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>>
>>         at java.util.Observable.notifyObservers(Observable.java:159)
>>
>>         at
>> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>>
>>         at
>> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>>
>>         at
>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>>
>>         at
>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>>
>>         at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>
>>         at java.lang.Thread.run(Thread.java:745)
>>
>> Caused by: java.lang.RuntimeException: Command execution failed:
>>
>> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>>
>>
>>
>>         at
>> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
>>
>>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>>
>>         ... 12 more
>>
>> [2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...
>>
>> [2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx
>>
>>
>>
>>
>>
>> Can you please provide me with a link for the binary distribution of
>> nginx ?
>>
>>
>>
>> *From:* Gayan Gunarathne [mailto:gayang@wso2.com <ga...@wso2.com>]
>> *Sent:* Saturday, June 6, 2015 7:49 AM
>> *To:* dev@stratos.apache.org
>> *Subject:* Re: How to use the Load Balancer with openstack
>>
>>
>>
>> Hi,
>>
>>
>>
>> On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <
>> athanasios.tsitsipas@uni-ulm.de> wrote:
>>
>> I tried to start nginx extention…
>>
>>
>>
>> It is get notified that an application exists but I get the following
>> error
>>
>>
>>
>> [2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to
>> cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42
>>
>> [2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx
>> configuration...
>>
>> [2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file:
>> /tmp/nginx.cfg
>>
>> [2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...
>>
>> [2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance
>>
>> [2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start
>> load balancer
>>
>> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
>> java.io.IOException: Cannot run program "nginx": error=2, No such file or
>> directory
>>
>>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>>
>>
>> Seems load balancer can't find the program nginx. Did you download and
>> extract Nginx binary distribution and provide that nginx file
>> path( -Dexecutable.file.path)  in nginx-extension.sh? [1]
>>
>>
>> [1]
>> https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
>>
>>
>>         at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>>
>>         at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>>
>>         at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>>
>>         at
>> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>>
>>         at java.util.Observable.notifyObservers(Observable.java:159)
>>
>>         at
>> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>>
>>         at
>> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>>
>>         at
>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>>
>>         at
>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>>
>>         at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>
>>         at java.lang.Thread.run(Thread.java:745)
>>
>> Caused by: java.io.IOException: Cannot run program "nginx": error=2, No
>> such file or directory
>>
>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>>
>>         at java.lang.Runtime.exec(Runtime.java:617)
>>
>>         at java.lang.Runtime.exec(Runtime.java:450)
>>
>>         at java.lang.Runtime.exec(Runtime.java:347)
>>
>>         at
>> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)
>>
>>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>>
>>         ... 12 more
>>
>> Caused by: java.io.IOException: error=2, No such file or directory
>>
>>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>>
>>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>>
>>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>>
>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>>
>>         ... 17 more
>>
>> [2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...
>>
>> [2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx
>>
>>
>>
>> I added the information for the activemq to jndi.properties file. Also I
>> changed the script file accordingly and the thrift xml.
>>
>>
>>
>> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
>> *Sent:* Friday, June 5, 2015 9:05 PM
>> *To:* dev
>> *Subject:* Re: How to use the Load Balancer with openstack
>>
>>
>>
>> Hi Athanasios,
>>
>>
>>
>> It's nice to hear that you are using the latest codebase, it has three
>> load balancing options:
>>
>>
>>
>> 1. Stratos Load Balancer
>>
>> 2. Nginx (via extension)
>>
>> 3. HAproxy (via extension)
>>
>>
>>
>> First you could try to run either of these against your Stratos
>> deployment and see whether they are working as expected (before trying the
>> puppet module). Load balancer only requires ActiveMQ and CEP information
>> (IP, port) to run.
>>
>>
>>
>> Do a complete build and find 1 in the following folder:
>>
>>
>> https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution
>>
>>
>>
>> Update loadbalancer.conf and thrift-client-config.xml with the above
>> values and start the product.
>>
>>
>>
>> Thanks
>>
>>
>>
>> On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <
>> athanasios.tsitsipas@uni-ulm.de> wrote:
>>
>> Hi there,
>>
>>
>>
>> We are trying to install Stratos 4.1.0 and ok we got over some bugs in
>> the files. More or less we can create many cartridges and use them with
>> applications. But we need a load balancer now connected with a ghost
>> application integrated with nodejs. What is the lb module in the puppet
>> master modules and what is the haproxy. How we will subscribe the
>> application we need to the load balancer and access the load balancer and
>> redirect us to the  multiple instances of the application above. Is there
>> any guide we can use?
>>
>>
>>
>> Many thanks in advance
>>
>>
>>
>> Athanasios Tsitsipas
>>
>>
>>
>>
>>
>> --
>>
>> Imesh Gunaratne
>>
>>
>>
>> Senior Technical Lead, WSO2
>>
>> Committer & PMC Member, Apache Stratos
>>
>>
>>
>>
>>
>> --
>>
>>
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>
>> Committer & PMC Member, Apache Stratos
>>
>> email : gayang@wso2.com  | mobile : +94 766819985
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>
>> Committer & PMC Member, Apache Stratos
>>
>> email : gayang@wso2.com  | mobile : +94 766819985
>>
>>
>>
>>
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>

Re: How to use the Load Balancer with openstack

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi,

On Sun, Jun 7, 2015 at 6:03 PM, Athanasios Tsitsipas <
athanasios.tsitsipas@uni-ulm.de> wrote:

> Hi Gayan,
>
>
>
> Excuse me for the massive mails.
>
> I fixed the problem with the unknown 7811 port. In thrift-client-config.xml
> of lb module it was defind as port the 7711 and maybe the https somehow it
> is configured at the next port 7811. If I define as port the 7611 and
> secure port 7711, everything works! I don’t get any error.
>
Great! It is a pleasure to hear that.Yeah usually thrift port is 7611 and
SSL thrift port will be 7711.


> Still, the
>     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
> \
>
> Is not filled in the stratos.sh. Even if you changed it in the template.
> It seems that it uses the arguments from the stratos.bat or something
> else???
>
> Also, in the init.pp the push templates doesn’t push the stratos.sh.erb :/
>

Thanks for reporting this.IMO we need to push the Stratos.sh with puppet as
we done for other modules.

>
>
> Thank you for your time.
>
>
>
> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de]
> *Sent:* Sunday, June 7, 2015 11:07 AM
>
> *To:* dev@stratos.apache.org
> *Subject:* RE: How to use the Load Balancer with openstack
>
>
>
> At the thrift-client-config.xml there is a configuration for the client.
> Which ip and port should I include. By default in the zip file it has:
>
>
>
> <!-- Apache thrift client configuration for publishing statistics to WSO2
> CEP -->
>
> <thriftClientConfiguration>
>
>     <username>admin</username>
>
>     <password>admin</password>
>
>     <ip>localhost</ip>
>
>     <port>7711</port>
>
> </thriftClientConfiguration>
>
>
>
> At the nginx extention parameters it has also these arguments in the
> nginx-extension.sh
>
>             -Dthrift.receiver.ip= <>
>
>             -Dthrift.receiver.port=7711
>
>
>
> What should I do? And where I can specify these ports for thrift.
>
>
>
> Also the template stratos.sh.erb is not used it seems that it takes the
> parameters from the stratos.bat. Can you check the file at the end, there
> are some syntax errors probably.
>
>
>
> Regards,
>
> Thanos
>
>
>
>
>
>
>
> *From:* Gayan Gunarathne [mailto:gayang@wso2.com <ga...@wso2.com>]
> *Sent:* Sunday, June 7, 2015 7:21 AM
> *To:* dev@stratos.apache.org
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi,
>
>
>
> On Sun, Jun 7, 2015 at 4:45 AM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> I had success with the nginx eventually.
>
>
>
> Glad to hear that you have success with the nginx.
>
>
>
> But now with the puppet module of stratos load balancer. I think there is
> a problem:
>
>
>
> In the stratos.sh on the spawned vm of load balancer under the folder
> /mnt/ …. , where the zip file of lb is unzip it misses the
>
>
>
>     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
> \
>
>
>
> A line that I get an error for! In the zip file at puppet master this line
> exists, but not in the spawned vm. Can we get a workaround for this?
>
> We need to add that property to the stratos.sh.erb of load balancer puppet
> module. Now I have added that system property to the
> https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.[1]
>
>
>
>  [1]
> https://git1-us-west.apache.org/repos/asf?p=stratos.git;a=blob;f=tools/puppet3/modules/lb/templates/bin/stratos.sh.erb;hb=2b7a104c
>
>
>
> Regards,
>
> Thanos
>
>
>
>
>
> P.s the error I get is the following
>
> TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL
> {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -
> Failed to activate load balancer service component
>
> java.lang.RuntimeException: Thrift client configuration file path system
> property is not set: thrift.client.config.file.path
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)
>
>         at
> org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)
>
>         at
> org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)
>
>         at
> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)
>
>         at
> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)
>
>         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:347)
>
>         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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)
>
>         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:347)
>
>         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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)
>
>         at
> org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)
>
>         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:347)
>
>         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:517)
>
>         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)
>
>
>
>
>
>
>
>
>
> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de]
> *Sent:* Saturday, June 6, 2015 4:06 PM
> *To:* dev@stratos.apache.org
> *Subject:* RE: How to use the Load Balancer with openstack
>
>
>
> Hi I did that, right now. I installed the nginx to Ubuntu and provided the
> executable path(/usr/sbin/nginx).
>
> If only download the distribution of nginx somehow I need to compile the
> code right?There is no executable file in it. I downloaded the distribution
> from this link: http://nginx.org/en/download.html.
>
>
>
> I’m getting this error now:
>
>
>
> [2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.lang.RuntimeException: Command execution failed:
>
> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>
>
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.lang.RuntimeException: Command execution failed:
>
> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>
>
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> [2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx
>
>
>
>
>
> Can you please provide me with a link for the binary distribution of nginx
> ?
>
>
>
> *From:* Gayan Gunarathne [mailto:gayang@wso2.com <ga...@wso2.com>]
> *Sent:* Saturday, June 6, 2015 7:49 AM
> *To:* dev@stratos.apache.org
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi,
>
>
>
> On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> I tried to start nginx extention…
>
>
>
> It is get notified that an application exists but I get the following error
>
>
>
> [2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to
> cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42
>
> [2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.io.IOException: Cannot run program "nginx": error=2, No such file or
> directory
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>
>
> Seems load balancer can't find the program nginx. Did you download and
> extract Nginx binary distribution and provide that nginx file
> path( -Dexecutable.file.path)  in nginx-extension.sh? [1]
>
>
> [1]
> https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
>
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.io.IOException: Cannot run program "nginx": error=2, No
> such file or directory
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>
>         at java.lang.Runtime.exec(Runtime.java:617)
>
>         at java.lang.Runtime.exec(Runtime.java:450)
>
>         at java.lang.Runtime.exec(Runtime.java:347)
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> Caused by: java.io.IOException: error=2, No such file or directory
>
>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>
>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>
>         ... 17 more
>
> [2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx
>
>
>
> I added the information for the activemq to jndi.properties file. Also I
> changed the script file accordingly and the thrift xml.
>
>
>
> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
> *Sent:* Friday, June 5, 2015 9:05 PM
> *To:* dev
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi Athanasios,
>
>
>
> It's nice to hear that you are using the latest codebase, it has three
> load balancing options:
>
>
>
> 1. Stratos Load Balancer
>
> 2. Nginx (via extension)
>
> 3. HAproxy (via extension)
>
>
>
> First you could try to run either of these against your Stratos deployment
> and see whether they are working as expected (before trying the puppet
> module). Load balancer only requires ActiveMQ and CEP information (IP,
> port) to run.
>
>
>
> Do a complete build and find 1 in the following folder:
>
>
> https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution
>
>
>
> Update loadbalancer.conf and thrift-client-config.xml with the above
> values and start the product.
>
>
>
> Thanks
>
>
>
> On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> Hi there,
>
>
>
> We are trying to install Stratos 4.1.0 and ok we got over some bugs in the
> files. More or less we can create many cartridges and use them with
> applications. But we need a load balancer now connected with a ghost
> application integrated with nodejs. What is the lb module in the puppet
> master modules and what is the haproxy. How we will subscribe the
> application we need to the load balancer and access the load balancer and
> redirect us to the  multiple instances of the application above. Is there
> any guide we can use?
>
>
>
> Many thanks in advance
>
>
>
> Athanasios Tsitsipas
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Senior Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
>
> Committer & PMC Member, Apache Stratos
>
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>
>
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
>
> Committer & PMC Member, Apache Stratos
>
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>
>
>



-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 766819985

RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
Hi Gayan,

 

Excuse me for the massive mails. 

I fixed the problem with the unknown 7811 port. In thrift-client-config.xml of lb module it was defind as port the 7711 and maybe the https somehow it is configured at the next port 7811. If I define as port the 7611 and secure port 7711, everything works! I don’t get any error. 

Still, the     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

Is not filled in the stratos.sh. Even if you changed it in the template.  It seems that it uses the arguments from the stratos.bat or something else???

Also, in the init.pp the push templates doesn’t push the stratos.sh.erb :/

 

Thank you for your time. 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Sunday, June 7, 2015 11:07 AM
To: dev@stratos.apache.org
Subject: RE: How to use the Load Balancer with openstack

 

At the thrift-client-config.xml there is a configuration for the client. Which ip and port should I include. By default in the zip file it has: 

 

<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->

<thriftClientConfiguration>

    <username>admin</username>

    <password>admin</password>

    <ip>localhost</ip>

    <port>7711</port>

</thriftClientConfiguration>

 

At the nginx extention parameters it has also these arguments in the nginx-extension.sh

            -Dthrift.receiver.ip= <>

            -Dthrift.receiver.port=7711

 

What should I do? And where I can specify these ports for thrift. 

 

Also the template stratos.sh.erb is not used it seems that it takes the parameters from the stratos.bat. Can you check the file at the end, there are some syntax errors probably.

 

Regards,

Thanos

 

 

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Sunday, June 7, 2015 7:21 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sun, Jun 7, 2015 at 4:45 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I had success with the nginx eventually.

 

Glad to hear that you have success with the nginx. 

 

But now with the puppet module of stratos load balancer. I think there is a problem:

 

In the stratos.sh on the spawned vm of load balancer under the folder /mnt/ …. , where the zip file of lb is unzip it misses the 

 

    -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

 

A line that I get an error for! In the zip file at puppet master this line exists, but not in the spawned vm. Can we get a workaround for this?

We need to add that property to the stratos.sh.erb of load balancer puppet module. Now I have added that system property to the https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.[1] <https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.%5B1%5D> 

 

 [1] https://git1-us-west.apache.org/repos/asf?p=stratos.git;a=blob;f=tools/puppet3/modules/lb/templates/bin/stratos.sh.erb;hb=2b7a104c

 

Regards,

Thanos

 

 

P.s the error I get is the following

TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -  Failed to activate load balancer service component

java.lang.RuntimeException: Thrift client configuration file path system property is not set: thrift.client.config.file.path

        at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)

        at org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)

        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)

        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:347)

        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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)

        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:347)

        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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)

        at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)

        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:347)

        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:517)

        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)

 

 

 

 

From: Athanasios Tsitsipas [mailto: <ma...@uni-ulm.de> athanasios.tsitsipas@uni-ulm.de] 
Sent: Saturday, June 6, 2015 4:06 PM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: RE: How to use the Load Balancer with openstack

 

Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link:  <http://nginx.org/en/download.html> http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto: <ma...@apache.org> imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 


RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
At the thrift-client-config.xml there is a configuration for the client. Which ip and port should I include. By default in the zip file it has: 

 

<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->

<thriftClientConfiguration>

    <username>admin</username>

    <password>admin</password>

    <ip>localhost</ip>

    <port>7711</port>

</thriftClientConfiguration>

 

At the nginx extention parameters it has also these arguments in the nginx-extension.sh

            -Dthrift.receiver.ip= <>

            -Dthrift.receiver.port=7711

 

What should I do? And where I can specify these ports for thrift. 

 

Also the template stratos.sh.erb is not used it seems that it takes the parameters from the stratos.bat. Can you check the file at the end, there are some syntax errors probably.

 

Regards,

Thanos

 

 

 

From: Gayan Gunarathne [mailto:gayang@wso2.com] 
Sent: Sunday, June 7, 2015 7:21 AM
To: dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sun, Jun 7, 2015 at 4:45 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I had success with the nginx eventually.

 

Glad to hear that you have success with the nginx. 

 

But now with the puppet module of stratos load balancer. I think there is a problem:

 

In the stratos.sh on the spawned vm of load balancer under the folder /mnt/ …. , where the zip file of lb is unzip it misses the 

 

    -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

 

A line that I get an error for! In the zip file at puppet master this line exists, but not in the spawned vm. Can we get a workaround for this?

We need to add that property to the stratos.sh.erb of load balancer puppet module. Now I have added that system property to the https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.[1] <https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.%5B1%5D> 

 

 [1] https://git1-us-west.apache.org/repos/asf?p=stratos.git;a=blob;f=tools/puppet3/modules/lb/templates/bin/stratos.sh.erb;hb=2b7a104c

 

Regards,

Thanos

 

 

P.s the error I get is the following

TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -  Failed to activate load balancer service component

java.lang.RuntimeException: Thrift client configuration file path system property is not set: thrift.client.config.file.path

        at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)

        at org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)

        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)

        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:347)

        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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)

        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:347)

        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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)

        at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)

        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:347)

        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:517)

        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)

 

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> ] 
Sent: Saturday, June 6, 2015 4:06 PM
To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: RE: How to use the Load Balancer with openstack

 

Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link:  <http://nginx.org/en/download.html> http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto: <ma...@apache.org> imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com <http://wso2.com/> )

Committer & PMC Member, Apache Stratos

email : gayang@wso2.com <ma...@wso2.com>   | mobile : +94 766819985 <tel:%2B94%20766819985> 

 

 


Re: How to use the Load Balancer with openstack

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi,

On Sun, Jun 7, 2015 at 4:45 AM, Athanasios Tsitsipas <
athanasios.tsitsipas@uni-ulm.de> wrote:

> I had success with the nginx eventually.
>

Glad to hear that you have success with the nginx.


> But now with the puppet module of stratos load balancer. I think there is
> a problem:
>

>
In the stratos.sh on the spawned vm of load balancer under the folder /mnt/
> …. , where the zip file of lb is unzip it misses the
>
>
>
>     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
> \
>
>
>
> A line that I get an error for! In the zip file at puppet master this line
> exists, but not in the spawned vm. Can we get a workaround for this?
>
We need to add that property to the stratos.sh.erb of load balancer puppet
module. Now I have added that system property to the
https://github.com/apache/stratos/blob/master/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb.[1]

 [1]
https://git1-us-west.apache.org/repos/asf?p=stratos.git;a=blob;f=tools/puppet3/modules/lb/templates/bin/stratos.sh.erb;hb=2b7a104c

>
>
> Regards,
>
> Thanos
>
>
>
>
>
> P.s the error I get is the following
>
> TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL
> {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -
> Failed to activate load balancer service component
>
> java.lang.RuntimeException: Thrift client configuration file path system
> property is not set: thrift.client.config.file.path
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)
>
>         at
> org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)
>
>         at
> org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)
>
>         at
> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)
>
>         at
> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)
>
>         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:347)
>
>         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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)
>
>         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:347)
>
>         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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)
>
>         at
> org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)
>
>         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:347)
>
>         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:517)
>
>         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)
>
>
>
>
>
>
>
>
>
> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de]
> *Sent:* Saturday, June 6, 2015 4:06 PM
> *To:* dev@stratos.apache.org
> *Subject:* RE: How to use the Load Balancer with openstack
>
>
>
> Hi I did that, right now. I installed the nginx to Ubuntu and provided the
> executable path(/usr/sbin/nginx).
>
> If only download the distribution of nginx somehow I need to compile the
> code right?There is no executable file in it. I downloaded the distribution
> from this link: http://nginx.org/en/download.html.
>
>
>
> I’m getting this error now:
>
>
>
> [2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.lang.RuntimeException: Command execution failed:
>
> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>
>
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.lang.RuntimeException: Command execution failed:
>
> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>
>
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> [2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx
>
>
>
>
>
> Can you please provide me with a link for the binary distribution of nginx
> ?
>
>
>
> *From:* Gayan Gunarathne [mailto:gayang@wso2.com <ga...@wso2.com>]
> *Sent:* Saturday, June 6, 2015 7:49 AM
> *To:* dev@stratos.apache.org
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi,
>
>
>
> On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> I tried to start nginx extention…
>
>
>
> It is get notified that an application exists but I get the following error
>
>
>
> [2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to
> cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42
>
> [2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.io.IOException: Cannot run program "nginx": error=2, No such file or
> directory
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>
>
> Seems load balancer can't find the program nginx. Did you download and
> extract Nginx binary distribution and provide that nginx file
> path( -Dexecutable.file.path)  in nginx-extension.sh? [1]
>
>
> [1]
> https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
>
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.io.IOException: Cannot run program "nginx": error=2, No
> such file or directory
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>
>         at java.lang.Runtime.exec(Runtime.java:617)
>
>         at java.lang.Runtime.exec(Runtime.java:450)
>
>         at java.lang.Runtime.exec(Runtime.java:347)
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> Caused by: java.io.IOException: error=2, No such file or directory
>
>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>
>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>
>         ... 17 more
>
> [2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx
>
>
>
> I added the information for the activemq to jndi.properties file. Also I
> changed the script file accordingly and the thrift xml.
>
>
>
> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
> *Sent:* Friday, June 5, 2015 9:05 PM
> *To:* dev
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi Athanasios,
>
>
>
> It's nice to hear that you are using the latest codebase, it has three
> load balancing options:
>
>
>
> 1. Stratos Load Balancer
>
> 2. Nginx (via extension)
>
> 3. HAproxy (via extension)
>
>
>
> First you could try to run either of these against your Stratos deployment
> and see whether they are working as expected (before trying the puppet
> module). Load balancer only requires ActiveMQ and CEP information (IP,
> port) to run.
>
>
>
> Do a complete build and find 1 in the following folder:
>
>
> https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution
>
>
>
> Update loadbalancer.conf and thrift-client-config.xml with the above
> values and start the product.
>
>
>
> Thanks
>
>
>
> On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> Hi there,
>
>
>
> We are trying to install Stratos 4.1.0 and ok we got over some bugs in the
> files. More or less we can create many cartridges and use them with
> applications. But we need a load balancer now connected with a ghost
> application integrated with nodejs. What is the lb module in the puppet
> master modules and what is the haproxy. How we will subscribe the
> application we need to the load balancer and access the load balancer and
> redirect us to the  multiple instances of the application above. Is there
> any guide we can use?
>
>
>
> Many thanks in advance
>
>
>
> Athanasios Tsitsipas
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Senior Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
>
> Committer & PMC Member, Apache Stratos
>
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>
>
>



-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 766819985

RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
In the /opt/stratos/apache-stratos-default/repository/conf/data-bridge/data-bridge-config.xml of my stratos setup the 7611 and 7711 is used I don’t know from where it takes the 7811 port!!!!!

 

    <!-- Default configuration for thriftDataReceiver -->

    <thriftDataReceiver>

        <hostName>0.0.0.0</hostName>

        <port>7611</port>

        <securePort>7711</securePort>

    </thriftDataReceiver>

 

:/

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Sunday, June 7, 2015 11:18 AM
To: dev@stratos.apache.org
Subject: RE: How to use the Load Balancer with openstack

 

Also from the base.pp  at the repository [1] there is no reference to 7811 and this is probably the https port as I can see from the exception.

 

Cheers,

Thanos 

 

[1] https://github.com/apache/stratos/blob/master/tools/puppet3/manifests/nodes/base.pp

 

From: Gayan Gunarathne [mailto:gayang@wso2.com] 
Sent: Sunday, June 7, 2015 7:45 AM
To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sun, Jun 7, 2015 at 5:58 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi,

 

I added manually to the lb vm, at stratos.sh in the command arguments and now i’m getting the error:

 

 

org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot borrow client for TCP,134.60.64.130:7711 <http://134.60.64.130:7711> ,TCP,134.60.64.130:7811 <http://134.60.64.130:7811> 

        at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)

        at org.wso2.carbon.databridge.agent.thrift.DataPublisher.start(DataPublisher.java:273)

        at org.wso2.carbon.databridge.agent.thrift.DataPublisher.<init>(DataPublisher.java:161)

        at org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$ReceiverConnectionWorker.run(AsyncDataPublisher.java:787)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.thrift.transport.TTransportException: Could not connect to 134.60.64.130 on port 7811

Load balancer used thrift client to publish its statistics details periodically to the CEP. Seems it can't connect to the port 7811. Are you running "ThriftDataReceiver" on 7811 port? 

 

        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212)

        at org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166)

        at org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:90)

        at org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:48)

        at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)

        at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:50)

        ... 8 more

Caused by: java.net.ConnectException: Connection refused

        at java.net.PlainSocketImpl.socketConnect(Native Method)

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

        at java.net.Socket.connect(Socket.java:579)

        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)

        at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:413)

        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)

        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:208)

        ... 13 more

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> ] 
Sent: Sunday, June 7, 2015 1:16 AM


To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: RE: How to use the Load Balancer with openstack

 

I had success with the nginx eventually. But now with the puppet module of stratos load balancer. I think there is a problem:

 

In the stratos.sh on the spawned vm of load balancer under the folder /mnt/ …. , where the zip file of lb is unzip it misses the 

 

    -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

 

A line that I get an error for! In the zip file at puppet master this line exists, but not in the spawned vm. Can we get a workaround for this?

 

Regards,

Thanos

 

 

P.s the error I get is the following

TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -  Failed to activate load balancer service component

java.lang.RuntimeException: Thrift client configuration file path system property is not set: thrift.client.config.file.path

        at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)

        at org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)

        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)

        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:347)

        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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)

        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:347)

        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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)

        at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)

        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:347)

        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:517)

        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)

 

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Saturday, June 6, 2015 4:06 PM
To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: RE: How to use the Load Balancer with openstack

 

Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link:  <http://nginx.org/en/download.html> http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto: <ma...@apache.org> imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com <http://wso2.com/> )

Committer & PMC Member, Apache Stratos

email : gayang@wso2.com <ma...@wso2.com>   | mobile : +94 766819985 <tel:%2B94%20766819985> 

 

 


RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
Also from the base.pp  at the repository [1] there is no reference to 7811 and this is probably the https port as I can see from the exception.

 

Cheers,

Thanos 

 

[1] https://github.com/apache/stratos/blob/master/tools/puppet3/manifests/nodes/base.pp

 

From: Gayan Gunarathne [mailto:gayang@wso2.com] 
Sent: Sunday, June 7, 2015 7:45 AM
To: dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sun, Jun 7, 2015 at 5:58 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi,

 

I added manually to the lb vm, at stratos.sh in the command arguments and now i’m getting the error:

 

 

org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot borrow client for TCP,134.60.64.130:7711 <http://134.60.64.130:7711> ,TCP,134.60.64.130:7811 <http://134.60.64.130:7811> 

        at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)

        at org.wso2.carbon.databridge.agent.thrift.DataPublisher.start(DataPublisher.java:273)

        at org.wso2.carbon.databridge.agent.thrift.DataPublisher.<init>(DataPublisher.java:161)

        at org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$ReceiverConnectionWorker.run(AsyncDataPublisher.java:787)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.thrift.transport.TTransportException: Could not connect to 134.60.64.130 on port 7811

Load balancer used thrift client to publish its statistics details periodically to the CEP. Seems it can't connect to the port 7811. Are you running "ThriftDataReceiver" on 7811 port? 

 

        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212)

        at org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166)

        at org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:90)

        at org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:48)

        at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)

        at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:50)

        ... 8 more

Caused by: java.net.ConnectException: Connection refused

        at java.net.PlainSocketImpl.socketConnect(Native Method)

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

        at java.net.Socket.connect(Socket.java:579)

        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)

        at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:413)

        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)

        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:208)

        ... 13 more

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> ] 
Sent: Sunday, June 7, 2015 1:16 AM


To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: RE: How to use the Load Balancer with openstack

 

I had success with the nginx eventually. But now with the puppet module of stratos load balancer. I think there is a problem:

 

In the stratos.sh on the spawned vm of load balancer under the folder /mnt/ …. , where the zip file of lb is unzip it misses the 

 

    -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

 

A line that I get an error for! In the zip file at puppet master this line exists, but not in the spawned vm. Can we get a workaround for this?

 

Regards,

Thanos

 

 

P.s the error I get is the following

TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -  Failed to activate load balancer service component

java.lang.RuntimeException: Thrift client configuration file path system property is not set: thrift.client.config.file.path

        at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)

        at org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)

        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)

        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:347)

        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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)

        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:347)

        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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)

        at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)

        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:347)

        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:517)

        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)

 

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Saturday, June 6, 2015 4:06 PM
To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: RE: How to use the Load Balancer with openstack

 

Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link:  <http://nginx.org/en/download.html> http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto: <ma...@apache.org> imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com <http://wso2.com/> )

Committer & PMC Member, Apache Stratos

email : gayang@wso2.com <ma...@wso2.com>   | mobile : +94 766819985 <tel:%2B94%20766819985> 

 

 


Re: How to use the Load Balancer with openstack

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi,

On Sun, Jun 7, 2015 at 5:58 AM, Athanasios Tsitsipas <
athanasios.tsitsipas@uni-ulm.de> wrote:

> Hi,
>
>
>
> I added manually to the lb vm, at stratos.sh in the command arguments and
> now i’m getting the error:
>
>
>
>
>
> org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot
> borrow client for TCP,134.60.64.130:7711,TCP,134.60.64.130:7811
>
>         at
> org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)
>
>         at
> org.wso2.carbon.databridge.agent.thrift.DataPublisher.start(DataPublisher.java:273)
>
>         at
> org.wso2.carbon.databridge.agent.thrift.DataPublisher.<init>(DataPublisher.java:161)
>
>         at
> org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$ReceiverConnectionWorker.run(AsyncDataPublisher.java:787)
>
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: org.apache.thrift.transport.TTransportException: Could not
> connect to 134.60.64.130 on port 7811
>
Load balancer used thrift client to publish its statistics details
periodically to the CEP. Seems it can't connect to the port 7811. Are you
running "ThriftDataReceiver" on 7811 port?

        at
> org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212)
>
>         at
> org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166)
>
>         at
> org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:90)
>
>         at
> org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:48)
>
>         at
> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
>
>         at
> org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:50)
>
>         ... 8 more
>
> Caused by: java.net.ConnectException: Connection refused
>
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>
>         at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
>
>         at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
>
>         at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
>
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>
>         at java.net.Socket.connect(Socket.java:579)
>
>         at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)
>
>         at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:413)
>
>         at
> sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
>
>         at
> org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:208)
>
>         ... 13 more
>
>
>
>
>
>
>
> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de]
> *Sent:* Sunday, June 7, 2015 1:16 AM
>
> *To:* dev@stratos.apache.org
> *Subject:* RE: How to use the Load Balancer with openstack
>
>
>
> I had success with the nginx eventually. But now with the puppet module of
> stratos load balancer. I think there is a problem:
>
>
>
> In the stratos.sh on the spawned vm of load balancer under the folder
> /mnt/ …. , where the zip file of lb is unzip it misses the
>
>
>
>     -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
> \
>
>
>
> A line that I get an error for! In the zip file at puppet master this line
> exists, but not in the spawned vm. Can we get a workaround for this?
>
>
>
> Regards,
>
> Thanos
>
>
>
>
>
> P.s the error I get is the following
>
> TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL
> {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -
> Failed to activate load balancer service component
>
> java.lang.RuntimeException: Thrift client configuration file path system
> property is not set: thrift.client.config.file.path
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)
>
>         at
> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)
>
>         at
> org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)
>
>         at
> org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)
>
>         at
> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)
>
>         at
> org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)
>
>         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:347)
>
>         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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)
>
>         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:347)
>
>         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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)
>
>         at
> org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)
>
>         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:347)
>
>         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:517)
>
>         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)
>
>
>
>
>
>
>
>
>
> *From:* Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de
> <at...@uni-ulm.de>]
> *Sent:* Saturday, June 6, 2015 4:06 PM
> *To:* dev@stratos.apache.org
> *Subject:* RE: How to use the Load Balancer with openstack
>
>
>
> Hi I did that, right now. I installed the nginx to Ubuntu and provided the
> executable path(/usr/sbin/nginx).
>
> If only download the distribution of nginx somehow I need to compile the
> code right?There is no executable file in it. I downloaded the distribution
> from this link: http://nginx.org/en/download.html.
>
>
>
> I’m getting this error now:
>
>
>
> [2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.lang.RuntimeException: Command execution failed:
>
> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>
>
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.lang.RuntimeException: Command execution failed:
>
> nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5
>
>
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> [2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx
>
>
>
>
>
> Can you please provide me with a link for the binary distribution of nginx
> ?
>
>
>
> *From:* Gayan Gunarathne [mailto:gayang@wso2.com <ga...@wso2.com>]
> *Sent:* Saturday, June 6, 2015 7:49 AM
> *To:* dev@stratos.apache.org
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi,
>
>
>
> On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> I tried to start nginx extention…
>
>
>
> It is get notified that an application exists but I get the following error
>
>
>
> [2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to
> cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42
>
> [2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.io.IOException: Cannot run program "nginx": error=2, No such file or
> directory
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>
>
> Seems load balancer can't find the program nginx. Did you download and
> extract Nginx binary distribution and provide that nginx file
> path( -Dexecutable.file.path)  in nginx-extension.sh? [1]
>
>
> [1]
> https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
>
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.io.IOException: Cannot run program "nginx": error=2, No
> such file or directory
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>
>         at java.lang.Runtime.exec(Runtime.java:617)
>
>         at java.lang.Runtime.exec(Runtime.java:450)
>
>         at java.lang.Runtime.exec(Runtime.java:347)
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> Caused by: java.io.IOException: error=2, No such file or directory
>
>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>
>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>
>         ... 17 more
>
> [2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx
>
>
>
> I added the information for the activemq to jndi.properties file. Also I
> changed the script file accordingly and the thrift xml.
>
>
>
> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
> *Sent:* Friday, June 5, 2015 9:05 PM
> *To:* dev
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi Athanasios,
>
>
>
> It's nice to hear that you are using the latest codebase, it has three
> load balancing options:
>
>
>
> 1. Stratos Load Balancer
>
> 2. Nginx (via extension)
>
> 3. HAproxy (via extension)
>
>
>
> First you could try to run either of these against your Stratos deployment
> and see whether they are working as expected (before trying the puppet
> module). Load balancer only requires ActiveMQ and CEP information (IP,
> port) to run.
>
>
>
> Do a complete build and find 1 in the following folder:
>
>
> https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution
>
>
>
> Update loadbalancer.conf and thrift-client-config.xml with the above
> values and start the product.
>
>
>
> Thanks
>
>
>
> On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> Hi there,
>
>
>
> We are trying to install Stratos 4.1.0 and ok we got over some bugs in the
> files. More or less we can create many cartridges and use them with
> applications. But we need a load balancer now connected with a ghost
> application integrated with nodejs. What is the lb module in the puppet
> master modules and what is the haproxy. How we will subscribe the
> application we need to the load balancer and access the load balancer and
> redirect us to the  multiple instances of the application above. Is there
> any guide we can use?
>
>
>
> Many thanks in advance
>
>
>
> Athanasios Tsitsipas
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Senior Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
>
> Committer & PMC Member, Apache Stratos
>
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>
>
>



-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 766819985

RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
Hi,

 

I added manually to the lb vm, at stratos.sh in the command arguments and now i’m getting the error:

 

 

org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot borrow client for TCP,134.60.64.130:7711,TCP,134.60.64.130:7811

        at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)

        at org.wso2.carbon.databridge.agent.thrift.DataPublisher.start(DataPublisher.java:273)

        at org.wso2.carbon.databridge.agent.thrift.DataPublisher.<init>(DataPublisher.java:161)

        at org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$ReceiverConnectionWorker.run(AsyncDataPublisher.java:787)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.thrift.transport.TTransportException: Could not connect to 134.60.64.130 on port 7811

        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212)

        at org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166)

        at org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:90)

        at org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:48)

        at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)

        at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:50)

        ... 8 more

Caused by: java.net.ConnectException: Connection refused

        at java.net.PlainSocketImpl.socketConnect(Native Method)

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

        at java.net.Socket.connect(Socket.java:579)

        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)

        at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:413)

        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)

        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:208)

        ... 13 more

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Sunday, June 7, 2015 1:16 AM
To: dev@stratos.apache.org
Subject: RE: How to use the Load Balancer with openstack

 

I had success with the nginx eventually. But now with the puppet module of stratos load balancer. I think there is a problem:

 

In the stratos.sh on the spawned vm of load balancer under the folder /mnt/ …. , where the zip file of lb is unzip it misses the 

 

    -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

 

A line that I get an error for! In the zip file at puppet master this line exists, but not in the spawned vm. Can we get a workaround for this?

 

Regards,

Thanos

 

 

P.s the error I get is the following

TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -  Failed to activate load balancer service component

java.lang.RuntimeException: Thrift client configuration file path system property is not set: thrift.client.config.file.path

        at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)

        at org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)

        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)

        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:347)

        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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)

        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:347)

        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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)

        at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)

        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:347)

        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:517)

        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)

 

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Saturday, June 6, 2015 4:06 PM
To: dev@stratos.apache.org <ma...@stratos.apache.org> 
Subject: RE: How to use the Load Balancer with openstack

 

Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link:  <http://nginx.org/en/download.html> http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto: <ma...@apache.org> imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 


RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
I had success with the nginx eventually. But now with the puppet module of stratos load balancer. I think there is a problem:

 

In the stratos.sh on the spawned vm of load balancer under the folder /mnt/ …. , where the zip file of lb is unzip it misses the 

 

    -Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml" \

 

A line that I get an error for! In the zip file at puppet master this line exists, but not in the spawned vm. Can we get a workaround for this?

 

Regards,

Thanos

 

 

P.s the error I get is the following

TID: [0] [LB] [2015-06-07 18:43:25,352] FATAL {org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent} -  Failed to activate load balancer service component

java.lang.RuntimeException: Thrift client configuration file path system property is not set: thrift.client.config.file.path

        at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:48)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56)

        at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPInFlightRequestPublisher.<init>(WSO2CEPInFlightRequestPublisher.java:42)

        at org.apache.stratos.common.statistics.publisher.InFlightRequestPublisherFactory.createInFlightRequestPublisher(InFlightRequestPublisherFactory.java:31)

        at org.apache.stratos.load.balancer.common.statistics.notifier.LoadBalancerStatisticsNotifier.<init>(LoadBalancerStatisticsNotifier.java:49)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.startStatisticsNotifier(LoadBalancerServiceComponent.java:235)

        at org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent.activate(LoadBalancerServiceComponent.java:153)

        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:347)

        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.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:245)

        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:347)

        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.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:58)

        at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)

        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:347)

        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:517)

        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)

 

 

 

 

From: Athanasios Tsitsipas [mailto:athanasios.tsitsipas@uni-ulm.de] 
Sent: Saturday, June 6, 2015 4:06 PM
To: dev@stratos.apache.org
Subject: RE: How to use the Load Balancer with openstack

 

Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link:  <http://nginx.org/en/download.html> http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [ <ma...@wso2.com> mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To:  <ma...@stratos.apache.org> dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto: <ma...@apache.org> imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. ( <http://wso2.com/> http://wso2.com)

Committer & PMC Member, Apache Stratos

email :  <ma...@wso2.com> gayang@wso2.com  | mobile :  <tel:%2B94%20766819985> +94 766819985

 

 


RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
Hi I did that, right now. I installed the nginx to Ubuntu and provided the executable path(/usr/sbin/nginx).

If only download the distribution of nginx somehow I need to compile the code right?There is no executable file in it. I downloaded the distribution from this link: http://nginx.org/en/download.html. 

 

I’m getting this error now:

 

[2015-06-06 13:59:04,464]  INFO - [Nginx] Generating nginx configuration...

[2015-06-06 13:59:04,576]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-06 13:59:04,576]  INFO - [Nginx] Starting nginx instance...

[2015-06-06 13:59:04,585] ERROR - [Nginx] Could not start nginx instance

[2015-06-06 13:59:04,586] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.RuntimeException: Command execution failed:

nginx: [emerg] unknown directive "tcp" in /tmp/nginx.cfg:5

 

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

[2015-06-06 13:59:04,599]  INFO - [Nginx] Stopping nginx...

[2015-06-06 13:59:04,605] ERROR - [Nginx] Could not stop nginx

 

 

Can you please provide me with a link for the binary distribution of nginx ?

 

From: Gayan Gunarathne [mailto:gayang@wso2.com] 
Sent: Saturday, June 6, 2015 7:49 AM
To: dev@stratos.apache.org
Subject: Re: How to use the Load Balancer with openstack

 

Hi,

 

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)


Seems load balancer can't find the program nginx. Did you download and extract Nginx binary distribution and provide that nginx file path( -Dexecutable.file.path)  in nginx-extension.sh? [1]


[1] https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md
 

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto:imesh@apache.org <ma...@apache.org> ] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos





 

-- 

 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com <http://wso2.com/> )

Committer & PMC Member, Apache Stratos

email : gayang@wso2.com <ma...@wso2.com>   | mobile : +94 766819985 <tel:%2B94%20766819985> 

 

 


Re: How to use the Load Balancer with openstack

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi,

On Sat, Jun 6, 2015 at 5:08 AM, Athanasios Tsitsipas <
athanasios.tsitsipas@uni-ulm.de> wrote:

> I tried to start nginx extention…
>
>
>
> It is get notified that an application exists but I get the following error
>
>
>
> [2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to
> cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42
>
> [2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...
>
> [2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file:
> /tmp/nginx.cfg
>
> [2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...
>
> [2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance
>
> [2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start
> load balancer
>
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.io.IOException: Cannot run program "nginx": error=2, No such file or
> directory
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)
>

Seems load balancer can't find the program nginx. Did you download and
extract Nginx binary distribution and provide that nginx file
path( -Dexecutable.file.path)  in nginx-extension.sh? [1]

[1]
https://github.com/apache/stratos/blob/master/extensions/load-balancer/nginx-extension/INSTALL.md

>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>
>         at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>
>         at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>         at java.util.Observable.notifyObservers(Observable.java:159)
>
>         at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)
>
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
> Caused by: java.io.IOException: Cannot run program "nginx": error=2, No
> such file or directory
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>
>         at java.lang.Runtime.exec(Runtime.java:617)
>
>         at java.lang.Runtime.exec(Runtime.java:450)
>
>         at java.lang.Runtime.exec(Runtime.java:347)
>
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)
>
>         at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)
>
>         ... 12 more
>
> Caused by: java.io.IOException: error=2, No such file or directory
>
>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>
>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>
>         ... 17 more
>
> [2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...
>
> [2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx
>
>
>
> I added the information for the activemq to jndi.properties file. Also I
> changed the script file accordingly and the thrift xml.
>
>
>
> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
> *Sent:* Friday, June 5, 2015 9:05 PM
> *To:* dev
> *Subject:* Re: How to use the Load Balancer with openstack
>
>
>
> Hi Athanasios,
>
>
>
> It's nice to hear that you are using the latest codebase, it has three
> load balancing options:
>
>
>
> 1. Stratos Load Balancer
>
> 2. Nginx (via extension)
>
> 3. HAproxy (via extension)
>
>
>
> First you could try to run either of these against your Stratos deployment
> and see whether they are working as expected (before trying the puppet
> module). Load balancer only requires ActiveMQ and CEP information (IP,
> port) to run.
>
>
>
> Do a complete build and find 1 in the following folder:
>
>
> https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution
>
>
>
> Update loadbalancer.conf and thrift-client-config.xml with the above
> values and start the product.
>
>
>
> Thanks
>
>
>
> On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <
> athanasios.tsitsipas@uni-ulm.de> wrote:
>
> Hi there,
>
>
>
> We are trying to install Stratos 4.1.0 and ok we got over some bugs in the
> files. More or less we can create many cartridges and use them with
> applications. But we need a load balancer now connected with a ghost
> application integrated with nodejs. What is the lb module in the puppet
> master modules and what is the haproxy. How we will subscribe the
> application we need to the load balancer and access the load balancer and
> redirect us to the  multiple instances of the application above. Is there
> any guide we can use?
>
>
>
> Many thanks in advance
>
>
>
> Athanasios Tsitsipas
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Senior Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>



-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 766819985

RE: How to use the Load Balancer with openstack

Posted by Athanasios Tsitsipas <at...@uni-ulm.de>.
I tried to start nginx extention…

 

It is get notified that an application exists but I get the following error

 

[2015-06-05 23:34:03,654]  INFO - [TopologyProvider] Member added to cluster: [cluster] test.ghost.ghost.domain [member] 192.168.8.42

[2015-06-05 23:34:04,211]  INFO - [Nginx] Generating nginx configuration...

[2015-06-05 23:34:04,218]  INFO - [Main] Configuration written to file: /tmp/nginx.cfg

[2015-06-05 23:34:04,218]  INFO - [Nginx] Starting nginx instance...

[2015-06-05 23:34:04,219] ERROR - [Nginx] Could not start nginx instance

[2015-06-05 23:34:04,219] ERROR - [LoadBalancerExtension] Could not start load balancer

org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:92)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)

        at org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)

        at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

        at java.util.Observable.notifyObservers(Observable.java:159)

        at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)

        at org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:68)

        at org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)

        at org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Cannot run program "nginx": error=2, No such file or directory

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

        at java.lang.Runtime.exec(Runtime.java:617)

        at java.lang.Runtime.exec(Runtime.java:450)

        at java.lang.Runtime.exec(Runtime.java:347)

        at org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:43)

        at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:88)

        ... 12 more

Caused by: java.io.IOException: error=2, No such file or directory

        at java.lang.UNIXProcess.forkAndExec(Native Method)

        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)

        at java.lang.ProcessImpl.start(ProcessImpl.java:130)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

        ... 17 more

[2015-06-05 23:34:04,228]  INFO - [Nginx] Stopping nginx...

[2015-06-05 23:34:04,229] ERROR - [Nginx] Could not stop nginx

 

I added the information for the activemq to jndi.properties file. Also I changed the script file accordingly and the thrift xml.

 

From: Imesh Gunaratne [mailto:imesh@apache.org] 
Sent: Friday, June 5, 2015 9:05 PM
To: dev
Subject: Re: How to use the Load Balancer with openstack

 

Hi Athanasios,

 

It's nice to hear that you are using the latest codebase, it has three load balancing options:

 

1. Stratos Load Balancer

2. Nginx (via extension)

3. HAproxy (via extension)

 

First you could try to run either of these against your Stratos deployment and see whether they are working as expected (before trying the puppet module). Load balancer only requires ActiveMQ and CEP information (IP, port) to run.

 

Do a complete build and find 1 in the following folder:

https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

 

Update loadbalancer.conf and thrift-client-config.xml with the above values and start the product.

 

Thanks

 

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <athanasios.tsitsipas@uni-ulm.de <ma...@uni-ulm.de> > wrote:

Hi there,

 

We are trying to install Stratos 4.1.0 and ok we got over some bugs in the files. More or less we can create many cartridges and use them with applications. But we need a load balancer now connected with a ghost application integrated with nodejs. What is the lb module in the puppet master modules and what is the haproxy. How we will subscribe the application we need to the load balancer and access the load balancer and redirect us to the  multiple instances of the application above. Is there any guide we can use?

 

Many thanks in advance

 

Athanasios Tsitsipas





 

-- 

Imesh Gunaratne

 

Senior Technical Lead, WSO2

Committer & PMC Member, Apache Stratos


Re: How to use the Load Balancer with openstack

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Athanasios,

It's nice to hear that you are using the latest codebase, it has three load
balancing options:

1. Stratos Load Balancer
2. Nginx (via extension)
3. HAproxy (via extension)

First you could try to run either of these against your Stratos deployment
and see whether they are working as expected (before trying the puppet
module). Load balancer only requires ActiveMQ and CEP information (IP,
port) to run.

Do a complete build and find 1 in the following folder:
https://github.com/apache/stratos/tree/master/products/load-balancer/modules/distribution

Update loadbalancer.conf and thrift-client-config.xml with the above values
and start the product.

Thanks

On Wed, Jun 3, 2015 at 7:23 PM, Athanasios Tsitsipas <
athanasios.tsitsipas@uni-ulm.de> wrote:

> Hi there,
>
>
>
> We are trying to install Stratos 4.1.0 and ok we got over some bugs in the
> files. More or less we can create many cartridges and use them with
> applications. But we need a load balancer now connected with a ghost
> application integrated with nodejs. What is the lb module in the puppet
> master modules and what is the haproxy. How we will subscribe the
> application we need to the load balancer and access the load balancer and
> redirect us to the  multiple instances of the application above. Is there
> any guide we can use?
>
>
>
> Many thanks in advance
>
>
>
> Athanasios Tsitsipas
>



-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos