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

**URL:** <https://forum.inductiveautomation.com/t/httpclient-java-io-ioexception-unable-to-establish-loopback-connection/53876>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 8, 2021, 10:56am UTC](https://forum.inductiveautomation.com/t/httpclient-java-io-ioexception-unable-to-establish-loopback-connection/53876 "2021-12-08T10:56:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 8, 2021, 6:00pm UTC](https://forum.inductiveautomation.com/t/httpclient-java-io-ioexception-unable-to-establish-loopback-connection/53876/3 "2021-12-08T18:00:59Z")

</div>

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()`.

---

_[View the full topic](https://forum.inductiveautomation.com/t/httpclient-java-io-ioexception-unable-to-establish-loopback-connection/53876)._
