httpClient. java.io.IOException: Unable to establish loopback connection

You can try launching your gateway with a value specified for jdk.internal.httpclient.selectorTimeout (in the wrapper.java.additional.params section of ignition.conf). It’s the time in milliseconds between runs of the HTTPClient’s ‘reaping’ action. The default value is 3000 (3 seconds), but lowering it might help (if the issue is actually a pseudo-socket leak.

Also, as a generally good practice, you should instantiate your httpClient() instance outside of the function. It can just be a top-level variable in your project library and referenced in http_force_exception().