How do I troubleshoot IO exception for HTTP or HTTPS endpoint?
2 minute read
I want to fix the “IO Exception in HttpClient” error I get when I send a message to HTTP or HTTPS endpoint from Amazon Simple Notification Service (Amazon SNS).
Amazon SNS sends SubscriptionURL or notification messages to one or more HTTP or HTTPS endpoints. This might generate the "IO Exception in HttpClient" error in ProviderResponse for HTTP or HTTPS endpoints.
Some common reasons for the error:
A low-level error from the server indicating either the connection has failed due to non-valid hostname or because the TCP server isn't listening.
The TCP connection has abruptly ended due to loss of internet connection.
The server isn't able to make a connection due to high network traffic (or lesser bandwidth).
"IO Exception in HttpClient" is a generic error. You can resolve it by resending the message manually. However, SNS topic provides a retry mechanism for failed messages. While setting up the retry mechanism for a given SNS policy, consider the following points:
The total number of retries must be greater than or equal to sum of no delay, minimum delay, and maximum delay retries.