Todor Avramov
02/16/2024, 10:39 PMpostServeActions
. Our JSON config is just about identical to the example provided in https://wiremock.org/docs/webhooks-and-callbacks/#creating-a-simple-single-webhook
Wiremock returned 200 OK to the caller and then proceeded to asynchronously send the webhook. However, wiremock errored out with a connection timeout error.
Failed to fire webhook POST <https://xyz.com/webhook/>
"wiremock.org.apache.hc.client5.http.HttpHostConnectException: Connect to <https://xyz.com:443> [<http://xyz.com/XXX.XXX.XXX.XXX|xyz.com/XXX.XXX.XXX.XXX>] failed: Connection timed out (Connection timed out)
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
at java.base/java.net.Socket.connect(Unknown Source)
at wiremock.org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.lambda$connectSocket$0(SSLConnectionSocketFactory.java:232)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at wiremock.org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:231)
at wiremock.org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:181)
at wiremock.org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:447)
at wiremock.org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:162)
at wiremock.org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:172)
at wiremock.org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:142)
at wiremock.org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at wiremock.org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
at wiremock.org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at wiremock.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
at wiremock.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:245)
at wiremock.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:188)
at wiremock.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:162)
at com.github.tomakehurst.wiremock.http.client.ApacheBackedHttpClient.execute(ApacheBackedHttpClient.java:51)
at org.wiremock.webhooks.Webhooks.lambda$triggerWebhook$0(Webhooks.java:98)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
",
Can wiremock be configured to retry on retryable network errors? Or is that a new feature request?
In general, 500-range responses and connection timeout errors should be considered retryable.Tom
02/17/2024, 11:06 AMTodor Avramov
02/17/2024, 4:40 PMTom
02/19/2024, 9:54 AM