0
votes

I have a mule flow calling another flow in the same application through HTTP protocol on a different port.

But I am receiving response 404 error even when the server is up. Below is my XML configuration.

<http:request-config name="HTTP_Request_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Request Configuration"/>
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<http:listener-config name="HTTP_Listener_Configuration1" host="0.0.0.0" port="8082" doc:name="HTTP Listener Configuration"/>
<flow name="mule1Flow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/flows" doc:name="HTTP"/>
    <set-variable variableName="mule1flowVar" value="mule1flowVar" doc:name="Variable"/>
    <set-payload value="Flow var = #[flowVars.mule1flowVar]" doc:name="Set Payload"/>
    <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    <http:request config-ref="HTTP_Request_Configuration" path="/flows2" method="GET" doc:name="HTTP"/>
</flow>
<flow name="mule1Flow1">
    <http:listener config-ref="HTTP_Listener_Configuration1" path="/flows2" doc:name="HTTP"/>
    <logger message="this is flow 2" level="INFO" doc:name="Logger"/>
</flow>

Log file shows below error: No listener found for request: (GET)/flows2. Available listeners are: [(*)/flows/].

3
You wouldn't get a 404 when the server is down, you would get a 500 or a request timeout. You will need a Request_Configuration for port 8082.TheBatman

3 Answers

0
votes

Your request-config should have port 8082.

0
votes

The http listener in the second flow is listening using port 8082 but your http requester that is trying to call it is using 8081. Change the http request or to use port 8082

-1
votes

Change the port of the reques configuration to 8082.The http requester port should match the port pf the listener flow.