stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <sanj...@wso2.com>
Subject Re: integrating haproxy with stratos
Date Fri, 11 Jul 2014 06:59:51 GMT
Looks like this thread fell off .. did we resolve this? Keeping HAProxy
working nicely is very important as that's the default non-HTTP LB.


On Tue, Jun 10, 2014 at 8:07 PM, Parvez Shaikh <parvez.h.shaikh@gmail.com>
wrote:

> Sorry to nag on this but wanted to check on this again.
>
> As of now I am applying some workarounds to mitigate this periodic startup
> of haproxy even in absence of topology change. Has this issue been observed
> in past?
>
>
> On Mon, Jun 9, 2014 at 8:05 PM, Parvez Shaikh <parvez.h.shaikh@gmail.com>
> wrote:
>
>> Thanks Nirmal for follow up.
>>
>> I traced the log after enabling DEBUG level. And it appears that topology
>> message keep on coming even if there is no topology change.
>> Due to this new topology event message, it appears that haproxy is being
>> respawned (previous instances still continue).
>>
>> Is haproxy-extension.sh reading topology event in promiscuous mode i.e.
>> not really 'consuming' message (or not removing from queue after reading
>> it)?
>>
>> Is there a way to change this, where same topology event is not
>> repeatedly acknowledged and topology change leads to termination of
>> previously started haproxy before start of new one?
>>
>> Let me know if I share logs.
>>
>> Parvez
>>
>>
>>
>>
>> On Mon, Jun 9, 2014 at 6:26 PM, Nirmal Fernando <nirmal070125@gmail.com>
>> wrote:
>>
>>>
>>>
>>>
>>> On Mon, Jun 9, 2014 at 6:26 PM, Nirmal Fernando <nirmal070125@gmail.com>
>>> wrote:
>>>
>>>> Imesh,
>>>>
>>>> Any idea?
>>>>
>>>>
>>>> On Mon, Jun 9, 2014 at 3:35 PM, Parvez Shaikh <
>>>> parvez.h.shaikh@gmail.com> wrote:
>>>>
>>>>> I figured out that we can provide bind-IP as a startup parameter in
>>>>> haproxy-extension.sh (
>>>>> http://mail-archives.apache.org/mod_mbox/stratos-dev/201402.mbox/%3CJIRA.12693370.1391613807947.42187.1391613969457@arcas%3E
>>>>> )
>>>>>
>>>>> However problem of repeated spawning of haproxy (even with default
>>>>> configuration provided as a part of package) persists.
>>>>>
>>>>> Thanks,
>>>>> Parvez
>>>>>
>>>>>
>>>>> On Mon, Jun 9, 2014 at 2:47 PM, Parvez Shaikh <
>>>>> parvez.h.shaikh@gmail.com> wrote:
>>>>>
>>>>>> One more question, haproxy frontend always binds itself to 127.0.0.1:<proxy
>>>>>> port> for backend auto scaled VMs.
>>>>>>
>>>>>> haproxy.cfg gets updated with following entries -
>>>>>>
>>>>>> frontend xyz.xyz.domain-host-127.0.0.1-proxy-8280
>>>>>> *        bind 127.0.0.1:8280 <http://127.0.0.1:8280>*
>>>>>>         mode http
>>>>>>         default_backend
>>>>>> xyz.xyz.domain-host-127.0.0.1-proxy-8280-members
>>>>>>
>>>>>> backend xyz.xyz.domain-host-127.0.0.1-proxy-8280-members
>>>>>>         mode http
>>>>>>         server xyz.xyz.domain85402fe9-733d-4d07-a15c-17bd0f72a672
>>>>>> 172.16.2.21:22
>>>>>>         server xyz.xyz.domain243f2caf-4860-4aba-80bf-96295c3010eb
>>>>>> 172.16.2.22:22
>>>>>>         server xyz.xyz.domain1dd22aac-2c27-433f-a99e-f257549d6fb2
>>>>>> 172.16.2.25:22
>>>>>>         server xyz.xyz.domain4edb342a-6ed7-44ef-858b-29edd31f68f9
>>>>>> 172.16.2.24:22
>>>>>>         server xyz.xyz.domaina9f27a71-064e-45f1-b92b-5d5728fb0b56
>>>>>> 172.16.2.23:22
>>>>>>
>>>>>> Is there a way we can change this to let it bind to 0.0.0.0 instead
>>>>>> of 127.0.0.1 ? Like any cartridge property which can help in this?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Parvez
>>>>>>
>>>>>>
>>>>>> On Mon, Jun 9, 2014 at 1:56 PM, Parvez Shaikh <
>>>>>> parvez.h.shaikh@gmail.com> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I am observing that haproxy processes kept on spawning.after every
>>>>>>> one minute -
>>>>>>>
>>>>>>> Starting haproxy extension...
>>>>>>> [2014-06-09 01:57:45,565]  INFO - [Main] HAProxy extension started
>>>>>>> [2014-06-09 01:57:45,620]  INFO - [LoadBalancerExtension] Load
>>>>>>> balancer extension started
>>>>>>> [2014-06-09 01:57:45,667]  WARN - [LoadBalancerExtension] Load
>>>>>>> balancer statistics reader not found
>>>>>>> [2014-06-09 01:57:45,680]  INFO - [TopologyEventMessageDelegator]
>>>>>>> Topology event message delegator started
>>>>>>>
>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>> explanation.
>>>>>>>  SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
>>>>>>> [2014-06-09 01:58:01,862]  INFO - [CompleteTopologyMessageProcessor]
>>>>>>> Topology initialized
>>>>>>> [2014-06-09 01:58:01,862]  INFO - [HAProxy] Configuring haproxy
>>>>>>> instance...
>>>>>>> [2014-06-09 01:58:02,109]  INFO - [Main] Configuration written to
>>>>>>> file:
>>>>>>> /opt/apache-stratos-haproxy-extension-4.0.0-incubating/./bin/../workspace/haproxy.cfg
>>>>>>> [2014-06-09 01:58:02,110]  INFO - [HAProxy] Configuration done
>>>>>>> *[2014-06-09 01:58:02,159]  INFO - [HAProxy] haproxy started*
>>>>>>> [2014-06-09 01:59:01,688]  INFO - [HAProxy] Configuring haproxy
>>>>>>> instance...
>>>>>>> [2014-06-09 01:59:01,718]  INFO - [Main] Configuration written to
>>>>>>> file:
>>>>>>> /opt/apache-stratos-haproxy-extension-4.0.0-incubating/./bin/../workspace/haproxy.cfg
>>>>>>> [2014-06-09 01:59:01,718]  INFO - [HAProxy] Configuration done
>>>>>>> *[2014-06-09 01:59:01,742]  INFO - [HAProxy] haproxy started*
>>>>>>> [2014-06-09 02:00:01,695]  INFO - [HAProxy] Configuring haproxy
>>>>>>> instance...
>>>>>>> [2014-06-09 02:00:01,713]  INFO - [Main] Configuration written to
>>>>>>> file:
>>>>>>> /opt/apache-stratos-haproxy-extension-4.0.0-incubating/./bin/../workspace/haproxy.cfg
>>>>>>> [2014-06-09 02:00:01,713]  INFO - [HAProxy] Configuration done
>>>>>>> *[2014-06-09 02:00:01,739]  INFO - [HAProxy] haproxy started*
>>>>>>>
>>>>>>> Any idea why is this happening? I replaced DEBUG  everywhere there
>>>>>>> was INFO in log4j.properties to see if there are any errors / failures but
>>>>>>> found none.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Parvez
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jun 9, 2014 at 12:57 PM, Nirmal Fernando <
>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>
>>>>>>>> Yes, Chris, most of these seems to be not there in wiki.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Jun 9, 2014 at 12:49 PM, chris snow <chsnow123@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Nirmal, does any of this information need to get added to the
>>>>>>>>> wiki?
>>>>>>>>>
>>>>>>>>> On Mon, Jun 9, 2014 at 8:13 AM, Nirmal Fernando <
>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>> > Yes, correct!
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Mon, Jun 9, 2014 at 12:38 PM, Parvez Shaikh <
>>>>>>>>> parvez.h.shaikh@gmail.com>
>>>>>>>>> > wrote:
>>>>>>>>> >>
>>>>>>>>> >> it worked, there seems to be some parameters in our haproxy.cfg
>>>>>>>>> which is
>>>>>>>>> >> upsetting this extension. On using default
>>>>>>>>> haproxy.cfg.template, it worked!
>>>>>>>>> >> :-)
>>>>>>>>> >>
>>>>>>>>> >> Can someone confirm, if  following understanding that ports
>>>>>>>>> from port
>>>>>>>>> >> mapping section of autoscaled cartridge are used by haproxy
>>>>>>>>> extension in the
>>>>>>>>> >> following fashion -
>>>>>>>>> >>
>>>>>>>>> >>         "portMapping":[
>>>>>>>>> >>             {
>>>>>>>>> >>                 "protocol":"http",  // protocol
>>>>>>>>> >>                 "port":"80",  // port on autoscaled cartridge
>>>>>>>>> >>                 "proxyPort":"8280" // port on haproxy /
>>>>>>>>> loadbalancer
>>>>>>>>> >> cartridge
>>>>>>>>> >>              }
>>>>>>>>> >>          ]
>>>>>>>>> >>
>>>>>>>>> >>
>>>>>>>>> >> Thank you for all your quick support
>>>>>>>>> >> Parvez
>>>>>>>>> >>
>>>>>>>>> >>
>>>>>>>>> >> On Mon, Jun 9, 2014 at 10:57 AM, Parvez Shaikh <
>>>>>>>>> parvez.h.shaikh@gmail.com>
>>>>>>>>> >> wrote:
>>>>>>>>> >>>
>>>>>>>>> >>> Thanks Nirmal,
>>>>>>>>> >>>
>>>>>>>>> >>> it worked, however I am seeing an exception on the console as
>>>>>>>>> follows -
>>>>>>>>> >>>
>>>>>>>>> >>> [2014-06-08 23:08:02,151] ERROR - [HAProxy] Could not start
>>>>>>>>> haproxy
>>>>>>>>> >>> [2014-06-08 23:08:02,152] ERROR - [LoadBalancerExtension]
>>>>>>>>> Could not start
>>>>>>>>> >>> load balancer
>>>>>>>>> >>>
>>>>>>>>> >>>
>>>>>>>>> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
>>>>>>>>> >>> java.lang.RuntimeException: Command execution failed:
>>>>>>>>> >>> [WARNING] 158/230802 (31422) : config : missing timeouts for
>>>>>>>>> proxy
>>>>>>>>> >>> 'ryslog_fwd'.
>>>>>>>>> >>>    | While not properly invalid, you will certainly encounter
>>>>>>>>> various
>>>>>>>>> >>> problems
>>>>>>>>> >>>    | with such a configuration. To fix this, please ensure
>>>>>>>>> that all
>>>>>>>>> >>> following
>>>>>>>>> >>>    | timeouts are set to a non-zero value: 'client',
>>>>>>>>> 'connect', 'server'.
>>>>>>>>> >>> [WARNING] 158/230802 (31422) : config : 'stats' statement
>>>>>>>>> ignored for
>>>>>>>>> >>> proxy 'ryslog_fwd' as it requires HTTP mode.
>>>>>>>>> >>>         at
>>>>>>>>> >>>
>>>>>>>>> org.apache.stratos.haproxy.extension.HAProxy.start(HAProxy.java:131)
>>>>>>>>> >>>         at
>>>>>>>>> >>>
>>>>>>>>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:99)
>>>>>>>>> >>>         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:133)
>>>>>>>>> >>>         at
>>>>>>>>> >>>
>>>>>>>>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:60)
>>>>>>>>> >>>         at
>>>>>>>>> >>>
>>>>>>>>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:77)
>>>>>>>>> >>>         at java.lang.Thread.run(Thread.java:744)
>>>>>>>>> >>>
>>>>>>>>> >>>
>>>>>>>>> >>> Note that I can see "haproxy" process running or started in
>>>>>>>>> background -
>>>>>>>>> >>> root     31424     1  0 23:08 ?        00:00:00
>>>>>>>>> /usr/sbin/haproxy -f
>>>>>>>>> >>> /tmp/haproxy.cfg -p /tmp/haproxy.pid
>>>>>>>>> >>>
>>>>>>>>> >>> I want to know co-relation between cartridge agent and this
>>>>>>>>> >>> haproxy-extension script.
>>>>>>>>> >>> Should the VM that runs haproxy-extension script be subscribed
>>>>>>>>> through
>>>>>>>>> >>> stratos and have cartridge agent running? Should cartridge
>>>>>>>>> agent which runs
>>>>>>>>> >>> haproxy-extension indicate itself as load-balancer cartridge -
>>>>>>>>> in that case
>>>>>>>>> >>> how to indicate in cartridge definition to use this extension
>>>>>>>>> as load
>>>>>>>>> >>> balancer overriding default loadbalancer?
>>>>>>>>> >>>
>>>>>>>>> >>> Right now load balancer VM (which runs haproxy) is not started
>>>>>>>>> by
>>>>>>>>> >>> subscribing cartridge through stratos console but by manually
>>>>>>>>> using IaaS
>>>>>>>>> >>> tools.
>>>>>>>>> >>>
>>>>>>>>> >>> Any pointers/guidance would be useful.
>>>>>>>>> >>>
>>>>>>>>> >>>
>>>>>>>>> >>> On Mon, Jun 9, 2014 at 9:10 AM, Nirmal Fernando <
>>>>>>>>> nirmal070125@gmail.com>
>>>>>>>>> >>> wrote:
>>>>>>>>> >>>>
>>>>>>>>> >>>> connectionfactoryName=TopicConnectionFactory
>>>>>>>>> >>>>
>>>>>>>>> >>>> Please use above as the connection factory name.
>>>>>>>>> >>>>
>>>>>>>>> >>>>
>>>>>>>>> >>>> On Mon, Jun 9, 2014 at 9:01 AM, Parvez Shaikh
>>>>>>>>> >>>> <parvez.h.shaikh@gmail.com> wrote:
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> I downloaded activemq-5.9.jar from
>>>>>>>>> >>>>> http://activemq.apache.org/activemq-590-release.html and
>>>>>>>>> put that jar in lib
>>>>>>>>> >>>>> directory of HAPROXY_EXTENSION home.
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> I am seeing following message -
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> [2014-06-08 21:18:08,060] ERROR - [TopicSubscriber] Error
>>>>>>>>> while
>>>>>>>>> >>>>> subscribing to the topic: topology
>>>>>>>>> >>>>> javax.naming.NameNotFoundException: topicConnectionfactory
>>>>>>>>> >>>>>         at
>>>>>>>>> >>>>>
>>>>>>>>> org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
>>>>>>>>> >>>>>         at
>>>>>>>>> javax.naming.InitialContext.lookup(InitialContext.java:411)
>>>>>>>>> >>>>>         at
>>>>>>>>> >>>>>
>>>>>>>>> org.apache.stratos.messaging.broker.connect.TopicConnector.init(TopicConnector.java:62)
>>>>>>>>> >>>>>
>>>>>>>>> >>>>>         at
>>>>>>>>> >>>>>
>>>>>>>>> org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.doSubscribe(TopicSubscriber.java:63)
>>>>>>>>> >>>>>         at
>>>>>>>>> >>>>>
>>>>>>>>> org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.run(TopicSubscriber.java:116)
>>>>>>>>> >>>>>         at java.lang.Thread.run(Thread.java:744)
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> Is there a way to move ahead?
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> Thanks,
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> P.S.
>>>>>>>>> >>>>> I did not put other dependencies like geronimo and hawtbuf,
>>>>>>>>> as did not
>>>>>>>>> >>>>> get any errors for these classes
>>>>>>>>> >>>>>
>>>>>>>>> >>>>>
>>>>>>>>> >>>>> On Mon, Jun 9, 2014 at 8:55 AM, Nirmal Fernando
>>>>>>>>> >>>>> <nirmal070125@gmail.com> wrote:
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> Sorry Parvez, we seems to lack documentation on this aspect.
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> You need to add following jars, to lib directory;
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> <!-- activemq client jars -->
>>>>>>>>> >>>>>>         <dependency>
>>>>>>>>> >>>>>> <groupId>org.apache.geronimo.specs</groupId>
>>>>>>>>> >>>>>>
>>>>>>>>> <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
>>>>>>>>> >>>>>>             <version>1.0.1</version>
>>>>>>>>> >>>>>>         </dependency>
>>>>>>>>> >>>>>>         <dependency>
>>>>>>>>> >>>>>>             <groupId>org.fusesource.hawtbuf</groupId>
>>>>>>>>> >>>>>>             <artifactId>hawtbuf</artifactId>
>>>>>>>>> >>>>>>             <version>1.9</version>
>>>>>>>>> >>>>>>         </dependency>
>>>>>>>>> >>>>>>         <dependency>
>>>>>>>>> >>>>>>            <groupId>org.apache.activemq</groupId>
>>>>>>>>> >>>>>>            <artifactId>activemq-client</artifactId>
>>>>>>>>> >>>>>>            <version>5.9.1</version>
>>>>>>>>> >>>>>>         </dependency>
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> On Mon, Jun 9, 2014 at 8:44 AM, Parvez Shaikh
>>>>>>>>> >>>>>> <parvez.h.shaikh@gmail.com> wrote:
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>> I think we're using ActiveMQ as message broker, is there
>>>>>>>>> an easy or
>>>>>>>>> >>>>>>> quick way to confirm that?
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>> Meanwhile the error changed -
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>> javax.naming.NoInitialContextException: Cannot instantiate
>>>>>>>>> class:
>>>>>>>>> >>>>>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>>>>>>>> [Root exception is
>>>>>>>>> >>>>>>> java.lang.ClassNotFoundException:
>>>>>>>>> >>>>>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory]
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>> I just quickly tried to find the jar org.apache.activemq
>>>>>>>>> and couldn't
>>>>>>>>> >>>>>>> find it in "lib" directory that comes with
>>>>>>>>> HAPROXY-EXTENSION zip file.
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>> Any pointers where to get this jar / class?
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>> On Mon, Jun 9, 2014 at 8:22 AM, Nirmal Fernando
>>>>>>>>> >>>>>>> <nirmal070125@gmail.com> wrote:
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> Hi Parvez,
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> Seems like the extension code is broken. Are you using
>>>>>>>>> ActiveMQ as
>>>>>>>>> >>>>>>>> the message broker? If so please replace your
>>>>>>>>> jndi.properties file with
>>>>>>>>> >>>>>>>> following;
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> connectionfactoryName=TopicConnectionFactory
>>>>>>>>> >>>>>>>> java.naming.provider.url=tcp://localhost:61616
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>>
>>>>>>>>> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> On Mon, Jun 9, 2014 at 8:10 AM, Parvez Shaikh
>>>>>>>>> >>>>>>>> <parvez.h.shaikh@gmail.com> wrote:
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> Thanks Imesh,
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> While it resolved unable to load jndi.properties
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> [2014-06-08 20:22:31,624] ERROR - [TopicSubscriber]
>>>>>>>>> Error while
>>>>>>>>> >>>>>>>>> subscribing to the topic: topology
>>>>>>>>> >>>>>>>>> javax.jms.JMSException: Error creating connection:
>>>>>>>>> Unable to
>>>>>>>>> >>>>>>>>> Connect
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:325)
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.wso2.andes.client.AMQConnectionFactory.createTopicConnection(AMQConnectionFactory.java:429)
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.apache.stratos.messaging.broker.connect.TopicConnector.init(TopicConnector.java:68)
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.doSubscribe(TopicSubscriber.java:63)
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.run(TopicSubscriber.java:116)
>>>>>>>>> >>>>>>>>>         at java.lang.Thread.run(Thread.java:744)
>>>>>>>>> >>>>>>>>> Caused by: org.wso2.andes.AMQConnectionFailureException:
>>>>>>>>> Unable to
>>>>>>>>> >>>>>>>>> Connect
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.wso2.andes.client.AMQConnection.<init>(AMQConnection.java:475)
>>>>>>>>> >>>>>>>>>         at
>>>>>>>>> >>>>>>>>>
>>>>>>>>> org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:315)
>>>>>>>>> >>>>>>>>>         ... 5 more
>>>>>>>>> >>>>>>>>> [2014-06-08 20:22:31,626]  INFO - [TopicSubscriber] Will
>>>>>>>>> try to
>>>>>>>>> >>>>>>>>> subscribe again in 30 sec
>>>>>>>>> >>>>>>>>> [2014-06-08 20:22:31,626] ERROR - [AMQStateManager] No
>>>>>>>>> Waiters for
>>>>>>>>> >>>>>>>>> error saving as last error:Exception thrown against
>>>>>>>>> AMQConnection:
>>>>>>>>> >>>>>>>>> Host: <<MB-Host>>
>>>>>>>>> >>>>>>>>> Port: 61616
>>>>>>>>> >>>>>>>>> Virtual Host: carbon
>>>>>>>>> >>>>>>>>> Client ID: carbon
>>>>>>>>> >>>>>>>>> Active session count: 0:
>>>>>>>>> org.wso2.andes.AMQDisconnectedException:
>>>>>>>>> >>>>>>>>> Server closed connection and reconnection not permitted.
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> Now I am suspecting following line in jndi.properties -
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>>
>>>>>>>>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>>>>>>>>> /carbon?brokerlist='tcp://<MB-Host>:61616'
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> Can someone help understand what this connection factory
>>>>>>>>> describing
>>>>>>>>> >>>>>>>>> here; I could relate to "tcp", a host name. port id and
>>>>>>>>> AMQP is most likely
>>>>>>>>> >>>>>>>>> describing a connection protocol to ActiveMQ Message
>>>>>>>>> broker, but unable to
>>>>>>>>> >>>>>>>>> gather what admin:admin@carbon/carbon really indicating
>>>>>>>>> here. Is this
>>>>>>>>> >>>>>>>>> configurable?
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> Thanks
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>> On Sun, Jun 8, 2014 at 11:01 PM, Imesh Gunaratne <
>>>>>>>>> imesh@apache.org>
>>>>>>>>> >>>>>>>>> wrote:
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>> Issue reported:
>>>>>>>>> https://issues.apache.org/jira/browse/STRATOS-668
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>> Thanks
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>> On Sun, Jun 8, 2014 at 10:45 PM, Imesh Gunaratne
>>>>>>>>> >>>>>>>>>> <imesh@apache.org> wrote:
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> Hi Parvez,
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> Welcome to Stratos, its really nice to hear that you
>>>>>>>>> are
>>>>>>>>> >>>>>>>>>>> experimenting with Stratos.
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> Regarding the issue you encountered, it seems like
>>>>>>>>> there is an
>>>>>>>>> >>>>>>>>>>> invalid entry in the jndi.properties file shipped with
>>>>>>>>> the HAProxy extension
>>>>>>>>> >>>>>>>>>>> package. Please open
>>>>>>>>> <HAPROXY_EXTENSION_HOME>/conf/jndi.properties file and
>>>>>>>>> >>>>>>>>>>> update java.naming.provider.url to following:
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> java.naming.provider.url=conf/jndi.properties
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> I will create a JIRA to fix this in the next release.
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> Thanks
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> On Sun, Jun 8, 2014 at 10:02 PM, Parvez Shaikh
>>>>>>>>> >>>>>>>>>>> <parvez.h.shaikh@gmail.com> wrote:
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> Hi experts,
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> I am new to stratos and exploring on how to integrate
>>>>>>>>> existing
>>>>>>>>> >>>>>>>>>>>> haproxy cartridge with stratos.
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> I am referring
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Configuring+HAProxy+Load+Balancer
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> After following steps mentioned in the link when I run
>>>>>>>>> >>>>>>>>>>>> haproxy-extension.sh, I am getting following error
>>>>>>>>> messgae -
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>> >>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> >>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> [jar:file:/opt/apache-stratos-haproxy-extension-4.0.0-incubating/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> >>>>>>>>>>>> SLF4J: See
>>>>>>>>> http://www.slf4j.org/codes.html#multiple_bindings for
>>>>>>>>> >>>>>>>>>>>> an explanation.
>>>>>>>>> >>>>>>>>>>>> [2014-06-08 09:57:39,480]  WARN -
>>>>>>>>> >>>>>>>>>>>> [PropertiesFileInitialContextFactory] Unable to load
>>>>>>>>> property file specified
>>>>>>>>> >>>>>>>>>>>> in Provider_URL:repository/conf/jndi.properties
>>>>>>>>> >>>>>>>>>>>> Due to:repository/conf/jndi.properties (No such file
>>>>>>>>> or
>>>>>>>>> >>>>>>>>>>>> directory)
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> This I am running in a VM which is expected to be a
>>>>>>>>> haproxy
>>>>>>>>> >>>>>>>>>>>> based load balancerr.
>>>>>>>>> >>>>>>>>>>>> Message is clear enough to indicate that
>>>>>>>>> >>>>>>>>>>>> repository/conf/jndi.properties file is not found.
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> Question I have is, how do I get this repository
>>>>>>>>> directory? Is
>>>>>>>>> >>>>>>>>>>>> it going to contain same 'conf' directory? Is it
>>>>>>>>> referring to directory on
>>>>>>>>> >>>>>>>>>>>> message broker host or same host as haproxy?
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> <HAProxy_EXTENSION_HOME> is where I have extracted in
>>>>>>>>> >>>>>>>>>>>> apache-stratos-load-balancer-4.0.0-incubating.zip and
>>>>>>>>> it doesn't have any
>>>>>>>>> >>>>>>>>>>>> 'repository' directory. Am I missing something
>>>>>>>>> important?
>>>>>>>>> >>>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>> Thanks
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> --
>>>>>>>>> >>>>>>>>>>> Imesh Gunaratne
>>>>>>>>> >>>>>>>>>>>
>>>>>>>>> >>>>>>>>>>> Technical Lead, WSO2
>>>>>>>>> >>>>>>>>>>> Committer & PPMC Member, Apache Stratos
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>> --
>>>>>>>>> >>>>>>>>>> Imesh Gunaratne
>>>>>>>>> >>>>>>>>>>
>>>>>>>>> >>>>>>>>>> Technical Lead, WSO2
>>>>>>>>> >>>>>>>>>> Committer & PPMC Member, Apache Stratos
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>>
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> --
>>>>>>>>> >>>>>>>> Best Regards,
>>>>>>>>> >>>>>>>> Nirmal
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> Nirmal Fernando.
>>>>>>>>> >>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> >>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>> >>>>>>>>
>>>>>>>>> >>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>>
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> --
>>>>>>>>> >>>>>> Best Regards,
>>>>>>>>> >>>>>> Nirmal
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> Nirmal Fernando.
>>>>>>>>> >>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> >>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>> >>>>>>
>>>>>>>>> >>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>> >>>>>
>>>>>>>>> >>>>>
>>>>>>>>> >>>>
>>>>>>>>> >>>>
>>>>>>>>> >>>>
>>>>>>>>> >>>> --
>>>>>>>>> >>>> Best Regards,
>>>>>>>>> >>>> Nirmal
>>>>>>>>> >>>>
>>>>>>>>> >>>> Nirmal Fernando.
>>>>>>>>> >>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> >>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>> >>>>
>>>>>>>>> >>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>> >>>
>>>>>>>>> >>>
>>>>>>>>> >>
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > --
>>>>>>>>> > Best Regards,
>>>>>>>>> > Nirmal
>>>>>>>>> >
>>>>>>>>> > Nirmal Fernando.
>>>>>>>>> > PPMC Member & Committer of Apache Stratos,
>>>>>>>>> > Senior Software Engineer, WSO2 Inc.
>>>>>>>>> >
>>>>>>>>> > Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Check out my professional profile and connect with me on LinkedIn.
>>>>>>>>> http://lnkd.in/cw5k69
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>


-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
email: sanjiva@wso2.com; office: (+1 650 745 4499 | +94  11 214 5345)
x5700; cell: +94 77 787 6880 | +1 408 466 5099; voip: +1 650 265 8311
blog: http://sanjiva.weerawarana.org/; twitter: @sanjiva
Lean . Enterprise . Middleware

Mime
View raw message