I have created a service in which I have to stop retry if first endpoint is down. I have also used failover false in loadbalance but still it is retrying.
Start StopRetryServiceProxy
<syn:endpoint name="StopRetryServiceProxy_EPR">
<syn:loadbalance policy="roundRobin" failover="false">
<syn:endpoint name="PStopRetryService-P116_64080">
<syn:address uri="http://XXX_01:64080/axis2/services/XXX">
<syn:timeout>
<syn:duration>30000</syn:duration>
<syn:responseAction>fault</syn:responseAction>
</syn:timeout>
<syn:markForSuspension>
<syn:errorCodes>101504, 101505</syn:errorCodes>
<syn:retriesBeforeSuspension>0</syn:retriesBeforeSuspension>
<syn:retryDelay>1</syn:retryDelay>
</syn:markForSuspension>
<syn:suspendOnFailure>
<syn:errorCodes>101500, 101501, 101506, 101507, 101508</syn:errorCodes>
<syn:initialDuration>30000</syn:initialDuration>
<syn:progressionFactor>1.0</syn:progressionFactor>
</syn:suspendOnFailure>
</syn:address>
</syn:endpoint>
<syn:endpoint name="StopRetryService-P117_64080">
<syn:address uri="http://XXX_02:64080/axis2/services/XXX">
<syn:timeout>
<syn:duration>30000</syn:duration>
<syn:responseAction>fault</syn:responseAction>
</syn:timeout>
<syn:markForSuspension>
<syn:errorCodes>101504, 101505</syn:errorCodes>
<syn:retriesBeforeSuspension>0</syn:retriesBeforeSuspension>
<syn:retryDelay>1</syn:retryDelay>
</syn:markForSuspension>
<syn:suspendOnFailure>
<syn:errorCodes>101500, 101501, 101506, 101507, 101508</syn:errorCodes>
<syn:initialDuration>30000</syn:initialDuration>
<syn:progressionFactor>1.0</syn:progressionFactor>
</syn:suspendOnFailure>
</syn:address>
</syn:endpoint>
</syn:loadbalance>
Can anyone please help me out? Thanks in advance
I met the same problem with WSO2 ESB 4.9.0. Finally I found a solution with dynamic endpoints. You can write the XML directly in the registry and put the failover="false" in the XML. What you have to be aware is to not modify the endpoint from the Endpoints view, because the attribute "failover" is not maintained in it
Related
I'm trying to use WSO2SP-4.3.0 as analytics for both WSO2AM-2.6.0 and WSO2EI-6.4.0 (integrator). The only reference I found for this options is mentioned here https://docs.wso2.com/display/SP430/Analytics+Solutions
Setting up ports and solutions map:
analytics.solutions:
APIM-analytics.enabled: true
EI-analytics.enabled: true
running a worker and dashboard of the SP
Seems the stream definitions for loganalyzer is not loaded, worker throws following exceptions:
ERROR {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} - Dropping wrongly formatted event sent
org.wso2.carbon.databridge.core.exception.EventConversionException: Error when converting loganalyzer:1.0.0 of event bundle with events 1
...
Caused by: org.wso2.carbon.databridge.core.exception.EventConversionException:
No StreamDefinition for streamId loganalyzer:1.0.0 present in cache
...
...
I haven't find source of the loganalyzer stream definition (even in the original ws2am-analytics-2.6.0 package).
Any help is appreciated (or shall I just disable the DAS_AGENT from APIM)?
This seems like a configuration issue. It might be easier to try one at a time to narrow down the problem. I suggest you follow [EI-Analytics] Configure WSO2 SP for WSO2 EI to configure EI analytics with SP with enabling EI analytics first.
We have deployed API-M 2.1 in a distributed way (each component, GW, TM, KM are running in their own Docker image) on top on DC/OS 1.9 ( Mesos ).
We have issues to get the gateway to enforce throttling policies (should it be subscription tiers or app-level policies). Here is what we have managed to define so far:
The Traffic Manager itself does it job : it receives the event streams, analyzes them on the fly and pushes an event onto the JMS topic throttledata
The Gateway reads the message properly.
So basically we have discarded a communication issue.
However we found two potential issues:
In the event which is pushed to the TM component, the value of the appTenant is null (instead of carbon.super)- We have a single tenant defined.
When the gateway receives the throttling message, it decides to let the message go thinking the "stopOnQuotaReach" is set to false, when it is set to true (we checked the value in the database).
Digging into the source code, we related those two issues to a single source: the value for both values above are read from the authContext and apparently incorrectly set. We are stuck and running out of ideas of things to try and would need some pointers to what could be a potential source of the problem and things to check.
Can somebody help please ?
Thanks- Isabelle.
Is there two TM with HA enabled available in the system?
If the TM is HA enabled, how gateways publish data to TM. Is it load balanced data publishing or failover data publishing to the TMs?
Did you follow below articles to configure the environment with respect to your deployment?
http://wso2.com/library/articles/2016/10/article-scalable-traffic-manager-deployment-patterns-for-wso2-api-manager-part-1/
http://wso2.com/library/articles/2016/10/article-scalable-traffic-manager-deployment-patterns-for-wso2-api-manager-part-2/
Is throttling completely not working in your environment?
Have you noticed any JMS connection related logs in gateways nodes?
In these tests, we have disabled HA to avoid possible complications. Neither subscription nor app throttling policies are working, both because parameters that should have values have not the adequate value (appTenant, stopOnQuotaReach).
Our scenario is far more basic. If we go with one instance of each component, it fails as Isabelle described. And the only thing we know is that both parameters come from the Authentication Context.
Thank you!
I configured an ESB cluster following this documentation
https://docs.wso2.com/display/ESB500/Clustered+Deployment but I still got a problem.
In each ESB nodes I got this log
WARN - CarbonEventManagementService CEP started with clustering enabled, but SingleNode configuration given.
instead of this one
INFO - RpcMembershipRequestHandler Received JOIN message from
Is there a way to have more details on the log to get what is wrong ?
I can post configuration files if someone can help ^^
Thanks !
If you are using hostnames for localMemberHost and <member> section in axis2.xml, change them to use IPs instead.
Test cluster of two brokers, WKA membership scheme, PostgreSQL message store, working fine for a couple of days, then throwing following errors:
TID: [] [] [2016-07-19 12:09:24,738] ERROR {org.wso2.andes.server.protocol.MultiVersionProtocolEngine} - Error establishing session {org.wso2.andes.server.protocol.MultiVersionProtocolEngine}
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:218)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Thread.java:745)
Startup of Message Broker looks fine, no errors, JDBC connection to PostgreSQL DB is ok, Registry mount looks ok. Then after that error appears in wso2carbon.log several times/minute.
Anyone any ideas? As far as I know nothing's changed and I don't know what it's trying to connect to.
This usually happens when client's whom connected to MB tries to create connections per message. jms is heavy connection and not recommended to create connections per each message. Therefore, please go through client implementation and verify connections are not created per message.
If by any chance you are using wso2 esb to publish/subscribe queues/topics to mb there is a property "transport.jms.CacheLevel" connection caching in esb axis2.xml.Read the documentation and use appropriate caching level for your usecase.
There was bug in connection caching property to be ignored in esb 4.8.1 which is currently fixed in 4.9.0 as well.
These are the possible cases I can think of with the given information. If you need more info please provide a detailed usecase.
I've been attempting to monitor the WSO2 MB 2.1.1 via JMX which appears to be a valid option for other WSO2 tools such as the ESB however the MB does not appear to be updating any of the MBeans for the Queue attributes.
Ex:
org.wso2.andes:type=VirtualHost.Queue,VirtualHost="carbon",name="testQueue"
This has a number of potentially useful attributes like the following:
ConsumerCount
ActiveConsumerCount
ReceivedMessageCount
MessageCount
However the counters always read "0" even when there are messages in the queue dropped in via the sample sender or manually.
Creating a new queue will create the following, but the issue is seen on the new queue as well.
org.wso2.andes:type=VirtualHost.Queue,VirtualHost="carbon",name="testQueue2"
Am I simply looking in the incorrect location or any other variety of user error?
Is this the intentional behavior of the application?
Do you have any suggestions which may assist in getting this data reported via JMX?
Any help would be appreciated.
Thanks
This does not appear to be functional in MB 2.1.1, it looks as if they may be moving to using the CEP or the BAM to provide metrics on some products.