[ESBJAVA-5027] Datapublisher instance count grows when DAS/BAM is not available to receive events Created: 22/Feb/17  Updated: 23/Feb/17  Resolved: 23/Feb/17

Status: Resolved
Project: WSO2 ESB
Component/s: None
Affects Version/s: 4.9.0
Fix Version/s: 4.9.0

Type: Bug Priority: Normal
Reporter: Mohanadarshan Vivekanandalingam Assignee: Mohanadarshan Vivekanandalingam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

Above issue is not there in last ESB since data publisher implementation is different in latest code.

Issue: You could see below logs when we configured a proxy or API with a publishEvent mediator and there is any DAS/CEP server available to receive events.

{org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher}
TID: [-1] [] [2017-02-23 12:49:36,505] ERROR {org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher}

- Reconnection failed for for tcp://localhost:7612

At this situation, Data publisher object gets created in-definitely until a connection is available. This will cause OOM at some situations.

Use JProfiler or any other proper tool and check below objects to verify the issue
org.wso2.carbon.databridge.agent.thrift.DataPublisher



 Comments   
Comment by Mohanadarshan Vivekanandalingam [ 23/Feb/17 ]

The issue is not available in latest ESB since data publisher implementation is different.





[ESBJAVA-5026] NullPointerException with two FIX endpoints (both initiator) Created: 22/Feb/17  Updated: 22/Feb/17

Status: Open
Project: WSO2 ESB
Component/s: Endpoints Management, Proxy Services Management
Affects Version/s: 5.0.0
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Petteri Pertola Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Running on Solaris 11 as a service.


Severity: Major
Estimated Complexity: Unknown
Attachment License: I agree to grant a license to WSO2 for this work for inclusion in WSO2 works as per the WSO2 Contributor License Agreement and the Apache License 2.0
Test cases added: Not-applicable

 Description   

Hello,

I am unable to configure two FIX endpoints which both are initiators towards different FIX servers. Let's call them Endpoints A and B.

The flow is as follows:

  1. Read XML message from JMS queue (MQ) - works perfect
  2. Convert to FIX message - works perfect
  3. Send FIX message towards Endpoint defined in configuration registry. - fails for Endpoint B (works for A)

The endpoints are configured identically, except for port and SenderCompID. Both sessions are heartbeating - I can see that on my remote acceptor FIX servers.

This is the error I see in wso2carbon.log

TID: [-1234] [] [2017-02-21 14:43:11,915]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: ID:414d5120434d4453202020202020202058a5c35d2e06ef1f, Direction: request, MESSAGE = LR_TRADES_IN, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><FIXML><FIXMLMessage><header><Sender><CompID>FIXWSO21-T</CompID></Sender><Target><CompID>XXXXX</CompID></Target><SendingTime/></header><ApplicationMessage><Order><ClOrdID>NEPP_CLORID_123123123</ClOrdID><BusinessUnit>LR_MARGIN_TEST</BusinessUnit><Side>1</Side><Currency>EUR</Currency><OrderQtyData><OrderQty>100</OrderQty><LegCalculatedCcyLastQty>745.00</LegCalculatedCcyLastQty></OrderQtyData><Price>7.45</Price><Symbol>EUR/DKK</Symbol><SettlDate>SPOT</SettlDate><SettlDateActual>20170223</SettlDateActual><PaymentDate>20170223</PaymentDate><QuoteID>GPE-Manual</QuoteID><Parties><PartyID>NOCust123456</PartyID></Parties><Country>NO</Country><TransactTime>20170223-13:18:00.000</TransactTime></Order></ApplicationMessage></FIXMLMessage></FIXML></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [-1234] [] [2017-02-21 14:43:11,919]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: ID:414d5120434d4453202020202020202058a5c35d2e06ef1f, Direction: request, MESSAGE = LR_TRADES_FORMATTED, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message><header><field id="35">D</field></header><body><field id="11">NEPP_CLORID_123123123</field><field id="29998">LR_MARGIN_TEST</field><field id="15">EUR</field><field id="117">GPE-Manual</field><field id="54">1</field><field id="38">100</field><field id="1074">745.00</field><field id="44">7.45</field><field id="55">EUR/DKK</field><field id="64">SPOT</field><field id="30001">20170223</field><field id="504">20170223</field><groups id="453"><group><field id="448">NOCust123456</field></group></groups><field id="421">NO</field><field id="60">20170223-13:18:00.000</field></body><trailer/></message></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [-1] [] [2017-02-21 14:43:11,920]  INFO {org.apache.axis2.engine.AxisEngine} -  [MessageContext: logID=f6f16a7e47b76eb09c88f32baf55c63247d65679aadc23cf] null {org.apache.axis2.engine.AxisEngine}
TID: [-1] [] [2017-02-21 14:43:11,921] ERROR {org.apache.synapse.core.axis2.AsyncCallback} -   {org.apache.synapse.core.axis2.AsyncCallback}
java.lang.NullPointerException
        at org.apache.synapse.transport.fix.FIXUtils.compareURLs(FIXUtils.java:557)
        at org.apache.synapse.transport.fix.FIXSessionFactory.getApplication(FIXSessionFactory.java:496)
        at org.apache.synapse.transport.fix.FIXOutgoingMessageHandler.sendToTarget(FIXOutgoingMessageHandler.java:132)
        at org.apache.synapse.transport.fix.FIXOutgoingMessageHandler.sendMessage(FIXOutgoingMessageHandler.java:113)
        at org.apache.synapse.transport.fix.FIXTransportSender.sendUsingEPR(FIXTransportSender.java:310)
        at org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:137)
        at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
        at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:626)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadP

Endpoint A configuration:

<endpoint xmlns="http://ws.apache.org/ns/synapse">
   <address uri="fix://hostname:9997?BeginString=FIXT.1.1&SenderCompID=FIXWSO21-P&TargetCompID=XXXXX">
      <suspendOnFailure>
         <progressionFactor>1.0</progressionFactor>
      </suspendOnFailure>
      <markForSuspension>
         <retriesBeforeSuspension>0</retriesBeforeSuspension>
         <retryDelay>0</retryDelay>
      </markForSuspension>
   </address>
   <property name="transport.fix.InitiatorConfigURL" value="file:/me01/apps/xxxxx/wso2esb-config/quickfix.cfg" scope="transport"/>
   <property name="transport.fix.InitiatorMessageStore" value="file" scope="transport"/>
</endpoint>

Endpoint B configuration:

<endpoint xmlns="http://ws.apache.org/ns/synapse">
   <address uri="fix://hostname:9996?BeginString=FIXT.1.1&SenderCompID=FIXWSO21-T&TargetCompID=XXXXX">
      <suspendOnFailure>
         <progressionFactor>1.0</progressionFactor>
      </suspendOnFailure>
      <markForSuspension>
         <retriesBeforeSuspension>0</retriesBeforeSuspension>
         <retryDelay>0</retryDelay>
      </markForSuspension>
   </address>
   <property name="transport.fix.InitiatorConfigURL" value="file:/me01/apps/xxxxx/wso2esb-config/quickfix.cfg" scope="transport"/>
   <property name="transport.fix.InitiatorMessageStore" value="file" scope="transport"/>
</endpoint>

Endpoint B does not work and throws above exception.

Notice the only difference in endpoint configuration is the target port (9996 vs 9997), and the SenderCompID (FIXWSO21-P vs FIXWSO21-T)

Both sessions are defined in quickfix.cfg referenced by the InitiatorConfigURL. The default settings are set to initiator, and the SocketConnectHost / Port on each session are correctly setup.

If I shutdown WSO2 ESB, then I see the following, where I can see that endpoint B EPR is null. Why is that? That is the cause of the nullpointerexception above.

TID: [-1] [] [2017-02-22 14:34:07,407] INFO

{org.apache.synapse.transport.fix.FIXIncomingMessageHandler} - FIX session logged out: FIXT.1.1:FIXWSO21-T->XXXXX {org.apache.synapse.transport.fix.FIXIncomingMessageHandler} {org.apache.synapse.transport.fix.FIXIncomingMessageHandler}
TID: [-1] [] [2017-02-22 14:34:07,407] INFO {org.apache.synapse.transport.fix.FIXIncomingMessageHandler}

- FIX session logged out: FIXT.1.1:FIXWSO21-P->XXXXX

{org.apache.synapse.transport.fix.FIXIncomingMessageHandler}

TID: [-1234] [] [2017-02-22 14:34:08,658] DEBUG

{org.apache.synapse.transport.fix.FIXSessionFactory} - FIX initiator to the EPR null stopped {org.apache.synapse.transport.fix.FIXSessionFactory}

TID: [-1234] [] [2017-02-22 14:34:08,658] DEBUG

{org.apache.synapse.transport.fix.FIXSessionFactory} - FIX initiator to the EPR fix://hostname:9997?BeginString=FIXT.1.1&SenderCompID=FIXWSO21-P&TargetCompID=XXXX stopped {org.apache.synapse.transport.fix.FIXSessionFactory}




[ESBJAVA-5025] Unable to read the response of a RPC message Created: 21/Feb/17  Updated: 21/Feb/17

Status: Open
Project: WSO2 ESB
Component/s: Mediators
Affects Version/s: 5.0.0
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Fabio Masini Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux/ESB5.0 with latest patches applied/RabbitMQ


Attachments: XML File wso2ToPMS.xml    
Severity: Major
Estimated Complexity: Moderate

 Description   

I'm trying to send a message to an amqp consumer using the RPC pattern.
The consumer correctly receive the message and responds to rabbitmq in the correct generated queue with the right correlation_id.
When the ESB receive the response it raise an exception:

TID[-1234] AppID[RabbitMQRPCProxyGeo2] [ESB] [2017-02-21 15:35:12,977] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out org.apache.axis2.transport.rabbitmq.utils.RabbitMQUtils.getTransportHeaders(RabbitMQUtils.java:125) org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:101) org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:81) org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185) org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167) org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:581) org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:78) org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548) org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382) org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65) org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210) org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173) org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231) javax.servlet.http.HttpServlet.service(HttpServlet.java:650) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.owasp.csrfguard.CsrfGuardFilter.doFilter(CsrfGuardFilter.java:72) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.wso2.carbon.ui.filters.CSRFPreventionFilter.doFilter(CSRFPreventionFilter.java:88) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.wso2.carbon.ui.filters.CRLFPreventionFilter.doFilter(CRLFPreventionFilter.java:59) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99) org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49) org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1749) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1708) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:745) 

I already tried to not set any application header but the problem still perxists.






[ESBJAVA-5024] Synapse.properties input stream is not properly closed Created: 21/Feb/17  Updated: 21/Feb/17

Status: Open
Project: WSO2 ESB
Component/s: Core Engine
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: Bhathiya Jayasekara Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

Property file input stream is not closed after reading the file.

https://github.com/wso2/wso2-synapse/blob/v2.1.7-wso2v3/modules/commons/src/main/java/org/apache/synapse/commons/util/MiscellaneousUtil.java#L174:L181






[ESBJAVA-5023] Incorrect error message in call-template with-param element Created: 21/Feb/17  Updated: 21/Feb/17

Status: Open
Project: WSO2 ESB
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: High
Reporter: Jagath Ariyarathne Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Severity: Major
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

When there is an empty with-param element is configured in call-template, it throws exception with description "SynapseException: The 'key' attribute is required for the XSLT mediator." although it is not related to XSLT mediator.

Following is the call-template sample;

<call-template target="sampleTemplate">
<with-param/>
<with-param name="parameter1" value="abc"/>
</call-template>



 Comments   
Comment by Jagath Ariyarathne [ 21/Feb/17 ]

Fix with https://github.com/wso2/wso2-synapse/pull/706





[ESBJAVA-5022] Incorrect Documentation - https://docs.wso2.com/display/ESB500/Configuring+the+JMS+Inbound+Protocol+with+WSO2+Message+Broker Created: 18/Feb/17  Updated: 18/Feb/17

Status: Open
Project: WSO2 ESB
Component/s: Documentation
Affects Version/s: 4.9.0, 5.0.0
Fix Version/s: None

Type: Bug Priority: Highest
Reporter: shammi Jayasinghe Assignee: Chanaka Fernando
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2017-02-17 at 3.40.48 PM.png    
Severity: Blocker
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

If you check the documentation [1], There we providing an XML configuration. But when an user using WSO2 ESB, There is no way to configure it as XML since for the Inbound endpoints, we dont have source view.

  • We should add an image of the current UI
  • In the specified configuration, There is no Destination parameters. In order to make this work, We should have it <parameter name="transport.jms.Destination">foo</parameter>
  • In the documentation we say following as in the image attached. But we should have a TopicConnectionFactory, since it is reffered from the the inbound endpoint.
  • We dont need a queue called JMSMS here, Why we are asking the user to create that

NOTE: Please fix these for 4.9.0 and 5.0.0 docs and review it with and ESB team member

[1] https://docs.wso2.com/display/ESB500/Configuring+the+JMS+Inbound+Protocol+with+WSO2+Message+Broker






Generated at Fri Feb 24 02:49:17 IST 2017 using JIRA 7.2.2#72004-sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.