Connect Timeout Error on cloudhub : Mule version:4.2.2

4.5k views Asked by At

I am trying to hit an https client api which is working fine on postman(gives response in 800ms) and in local mule flow but it is not working fine on cloudhub . I am getting Connect Timeout error. It tries connecting for 30 secs(as per logs) and then gives HTTP:CONNECTIVITY error.

failed: Connect timeout.
errorType=HTTP:CONNECTIVITY
cause=org.mule.extension.http.api.error.HttpRequestFailedException

Response Timeout that I have set is 5 mins. The flow was working fine when deployed on cloudhub before.It stopped working a few days ago though I didn't make any changes to my code.I am unable to debug this issue as it is not reproducible on my local env(it works perfectly). Any help would be appreciated.

2

There are 2 answers

0
Thinker-101 On BEST ANSWER

There are 4 different types of general timeouts mule HTTP calls offer. Each has its own differences.

  • Connection Idle Timeout
  • Response Timeout
  • Max Idle Timeout
  • Query or Transactions Timeout ( Applies for DB Connectors)

Since you are getting

HTTP:CONNECTIVITY ERROR. Applying a 5 min Response Timeout doesn't help. Response Timeout (means taking longer time to respond) should be worried only after Establishing a Connection Handshake.

Your problem is with the Connection itself.

The only possible way you could try fixing this is by Applying a Connection Idle Timeout and a Reconnection Strategy with some frequency gaps.

Since you are so sure about tests in local. I suggest you the below two steps:

1. Try using the same HTTP connector configuration in a separate new mule APP. Try with a simple listener and the failing requestor. Also add one more freely available online REST services into your code in other extra flow. Now try to test both. See which one is working and which is failing.

This would tell if it's a real HTTP CONNECTIVITY problem or anything else related to some mule bug.

 2. Check your configurations once again and make sure if your hitting the same endpoint in the cloudhub version.

Finally, I hope you did not accidentally put any proxy conf in the local version.

1
aled On

If it was working, probably there was a networking change in the other side that prevents access from the CloudHub application. You didn't share the URL so it is not clear if it is an internal host or a public host. We also don't know if there is some kind of whitelisting on the server side.

You can test connectivity to the HTTP host and port using the Network Tools application, to see if it accessible from your CloudHub environment.