Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-8600

Setting wrong encoding causes flow execution to hang

    Details

    • Severity:
      S1
    • Story Points:
      8
    • Configuration:
      Hide
      <?xml version="1.0" encoding="UTF-8"?>
      
      <mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:db="http://www.mulesoft.org/schema/mule/db"
              xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
              xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
              xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
              xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.7.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
      http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
      http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
      http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
      http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
      http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd">
          <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
          <http:request-config name="HTTP_Request_Configuration3" host="localhost" port="8082" doc:name="HTTP Request Configuration"/>
          <flow name="nonblockingFlow" processingStrategy="non-blocking">
              <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP" allowedMethods="GET"/>
              <set-payload value="Response OK" encoding="asdfsadf"  />
          </flow>
      </mule>
      
      Show
      <?xml version= "1.0" encoding= "UTF-8" ?> <mule xmlns:scripting = "http://www.mulesoft.org/schema/mule/scripting" xmlns:db = "http://www.mulesoft.org/schema/mule/db" xmlns:tracking = "http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http = "http://www.mulesoft.org/schema/mule/http" xmlns= "http://www.mulesoft.org/schema/mule/core" xmlns:doc = "http://www.mulesoft.org/schema/mule/documentation" xmlns:spring = "http://www.springframework.org/schema/beans" version= "EE-3.7.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd"> <http:listener-config name= "HTTP_Listener_Configuration" host= "0.0.0.0" port= "8081" doc:name= "HTTP Listener Configuration" /> <http:request-config name= "HTTP_Request_Configuration3" host= "localhost" port= "8082" doc:name= "HTTP Request Configuration" /> <flow name= "nonblockingFlow" processingStrategy= "non-blocking" > <http:listener config-ref= "HTTP_Listener_Configuration" path= "/" doc:name= "HTTP" allowedMethods= "GET" /> <set-payload value= "Response OK" encoding= "asdfsadf" /> </flow> </mule>
    • Log Output:
      Hide
      ERROR 2015-05-13 16:39:31,135 [[default].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy:
      ********************************************************************************
      Message : asdfsadf (java.io.UnsupportedEncodingException)
      Type : org.mule.api.transformer.TransformerException
      Code : MULE_ERROR--2
      JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html
      Transformer : ObjectToByteArray{this=94ec88b, name='ObjectToByteArray', ignoreBadInput=false, returnClass=SimpleDataType{type=[B, mimeType='*/*', encoding='null'}, sourceTypes=[SimpleDataType{type=java.io.Serializable, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.io.InputStream, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}, SimpleDataType{type=org.mule.api.transport.OutputHandler, mimeType='*/*', encoding='null'}]}
      ********************************************************************************
      Exception stack is:
      1. asdfsadf (java.io.UnsupportedEncodingException)
        java.lang.StringCoding:341 (null)
      2. asdfsadf (java.io.UnsupportedEncodingException) (org.mule.api.transformer.TransformerException)
        org.mule.transformer.simple.ObjectToByteArray:75 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html)
      ********************************************************************************
      Root Exception stack trace:
      java.io.UnsupportedEncodingException: asdfsadf
      at java.lang.StringCoding.encode(StringCoding.java:341)
      at java.lang.String.getBytes(String.java:916)
      at org.mule.transformer.simple.ObjectToByteArray.doTransform(ObjectToByteArray.java:41)
      at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:415)
      at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:419)
      at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:367)
      at org.mule.DefaultMuleMessage.getPayloadAsBytes(DefaultMuleMessage.java:708)
      at org.mule.module.http.internal.listener.HttpResponseBuilder.build(HttpResponseBuilder.java:160)
      at org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.sendResponseToClient(HttpMessageProcessorTemplate.java:97)
      at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:80)
      at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:37)
      at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.process(PhaseExecutionEngine.java:114)
      at org.mule.execution.PhaseExecutionEngine.process(PhaseExecutionEngine.java:41)
      at org.mule.execution.MuleMessageProcessingManager.processMessage(MuleMessageProcessingManager.java:32)
      at org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:126)
      at org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:83)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:102)
      at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:30)
      at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:125)
      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:744)

      ********************************************************************************
      Show
      ERROR 2015-05-13 16:39:31,135 [[default].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : asdfsadf (java.io.UnsupportedEncodingException) Type : org.mule.api.transformer.TransformerException Code : MULE_ERROR--2 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html Transformer : ObjectToByteArray{this=94ec88b, name='ObjectToByteArray', ignoreBadInput=false, returnClass=SimpleDataType{type=[B, mimeType='*/*', encoding='null'}, sourceTypes=[SimpleDataType{type=java.io.Serializable, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.io.InputStream, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}, SimpleDataType{type=org.mule.api.transport.OutputHandler, mimeType='*/*', encoding='null'}]} ******************************************************************************** Exception stack is: 1. asdfsadf (java.io.UnsupportedEncodingException)   java.lang.StringCoding:341 (null) 2. asdfsadf (java.io.UnsupportedEncodingException) (org.mule.api.transformer.TransformerException)   org.mule.transformer.simple.ObjectToByteArray:75 ( http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html ) ******************************************************************************** Root Exception stack trace: java.io.UnsupportedEncodingException: asdfsadf at java.lang.StringCoding.encode(StringCoding.java:341) at java.lang.String.getBytes(String.java:916) at org.mule.transformer.simple.ObjectToByteArray.doTransform(ObjectToByteArray.java:41) at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:415) at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:419) at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:367) at org.mule.DefaultMuleMessage.getPayloadAsBytes(DefaultMuleMessage.java:708) at org.mule.module.http.internal.listener.HttpResponseBuilder.build(HttpResponseBuilder.java:160) at org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.sendResponseToClient(HttpMessageProcessorTemplate.java:97) at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:80) at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:37) at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.process(PhaseExecutionEngine.java:114) at org.mule.execution.PhaseExecutionEngine.process(PhaseExecutionEngine.java:41) at org.mule.execution.MuleMessageProcessingManager.processMessage(MuleMessageProcessingManager.java:32) at org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:126) at org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:83) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:102) at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:30) at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:125) 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:744) ********************************************************************************
    • Sprint:
      ESB K2 2

      Description

      Deploy the below config and run this:

      curl -m 10 http://localhost:8081/
      curl: (28) Operation timed out after 10004 milliseconds with 0 bytes received

      It logs an error as soon as I send the request but then I only receive the curl timeout without Mule doing anything.

      When I remove encoding="asdfsadf" ti returns 200 immediately.

        Attachments

          Activity

            People

            Assignee:
            andres.gregoire Andres Gregoire [X] (Inactive)
            Reporter:
            alejandro.sequeira Alejandro Sequeira [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                PagerDuty