[ESBJAVA-3620] Proxy fault sequence is not getting triggered when multiple call mediators present in a flow and fault happens from a call other than the first one. Created: 24/Mar/15  Updated: 26/Mar/15  Resolved: 24/Mar/15

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

Type: Bug Priority: High
Reporter: Isuru Udana Loku Narangoda Assignee: Isuru Udana Loku Narangoda
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

 Comments   
Comment by Isuru Udana Loku Narangoda [ 24/Mar/15 ]

This is a bug in the fault handling logic. But there is a workaround to overcome from this.

We need to define a named sequence to handle fault. And refer that defined named sequence from
following two places of the proxy configuration.
1. onError attribute of inSequence of the proxy
2. faultSequence attribute of the target element of the proxy
And then get rid of the inline fault sequence defined in the proxy configuration.

Following is a sample proxy configuration.

<proxy name="SQP"
          transports="https http"
          startOnLoad="true"
          trace="disable">
      <description/>
      <target faultSequence="faultHandler">
         <inSequence onError="faultHandler">
            <call>
               <endpoint>
                  <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
               </endpoint>
            </call>
            <payloadFactory media-type="xml">
               <format>
                  <ser:getQuote xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd">
                     <ser:request>
                        <xsd:symbol>Q2</xsd:symbol>
                     </ser:request>
                  </ser:getQuote>
               </format>
               <args/>
            </payloadFactory>
            <property name="FORCE_ERROR_ON_SOAP_FAULT" value="true" type="STRING"/>
            <call>
               <endpoint>
                  <address uri="http://localhost:9000/services/Foo" format="soap12"/>
               </endpoint>
            </call>
            <respond/>
         </inSequence>
      </target>
   </proxy>
   <sequence name="faultHandler">
      <log>
         <property name="MSG" value="==== Fault Seq ===="/>
      </log>
      <respond/>
   </sequence>
Comment by Isuru Udana Loku Narangoda [ 24/Mar/15 ]

Fix merged to wso2 develop branch at [1]

[1] https://github.com/wso2/wso2-synapse/pull/111

Comment by Isuru Udana Loku Narangoda [ 26/Mar/15 ]

Fix improved in https://github.com/wso2/wso2-synapse/pull/120





[ESBJAVA-3616] Synapse worker threads get blocked on ScriptMediator#prepareExternalScript() Created: 23/Mar/15  Updated: 26/Mar/15  Resolved: 26/Mar/15

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

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

Severity: Major
Estimated Complexity: Moderate
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: Yes

 Description   

Synapse worker threads get blocked on synchronization blocks used in ScriptMediator#prepareExternalScript().
This is observed with the scripts stored in the registry.

"PassThroughMessageProcessor-395" prio=10 tid=0x00007f5824118000 nid=0x4249 waiting for monitor entry [0x00007f57c5151000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.synapse.mediators.bsf.ScriptMediator.prepareExternalScript(ScriptMediator.java:374)

  • waiting to lock <0x00000000c76b6c18> (a org.apache.synapse.mediators.bsf.ScriptMediator)
    at org.apache.synapse.mediators.bsf.ScriptMediator.mediateWithExternalScript(ScriptMediator.java:270)
    at org.apache.synapse.mediators.bsf.ScriptMediator.invokeScript(ScriptMediator.java:233)
    at org.apache.synapse.mediators.bsf.ScriptMediator.mediate(ScriptMediator.java:203)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:268)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:225)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)


 Comments   
Comment by Ishan Jayawardena [ 26/Mar/15 ]

Merged the fixes in
https://github.com/wso2/wso2-synapse/pull/110, https://github.com/wso2/wso2-synapse/pull/115





[ESBJAVA-3594] HEAD method invocation for APIs created by tenants hangs Created: 04/Mar/15  Updated: 24/Mar/15  Resolved: 24/Mar/15

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

Type: Patch Priority: Highest
Reporter: Harsha Kumara Assignee: Sivajothy Vanjikumaran
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ESB 4.8.1


Attachments: Text File MTReceiver_HEAD.patch    
Estimated Complexity: Moderate
Test cases added: Yes

 Description   

HTTP head method invocations for APIs created by tenants hangs and not giving response.

  • About to connect() to 10.100.5.81 port 8280 (#0)
  • Trying 10.100.5.81...
  • Adding handle: conn: 0xdc7c70
  • Adding handle: send: 0
  • Adding handle: recv: 0
  • Curl_addHandleToPipeline: length: 1
  • - Conn 0 (0xdc7c70) send_pipe: 1, recv_pipe: 0
  • Connected to 10.100.5.81 (10.100.5.81) port 8280 (#0)
    > HEAD /t/harsha.com/mytenant HTTP/1.1
    > User-Agent: curl/7.32.0
    > Host: 10.100.5.81:8280
    > Accept: /
    >
  • Empty reply from server
  • Connection #0 to host 10.100.5.81 left intact
    curl: (52) Empty reply from server


 Comments   
Comment by Ananda Manoj Kumara [ 04/Mar/15 ]

Committed to patch0010 with r211782.

Comment by Harsha Kumara [ 05/Mar/15 ]

Added pull request for kernal in https://github.com/wso2/carbon4-kernel/pull/156





Generated at Sun Mar 29 19:11:24 IST 2015 using JIRA 6.0.1#6096-sha1:e4a48bd73c6b8a4d99c824976ce5808b4c85857d.