# Webdev loopback connection error

**URL:** <https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 28, 2024, 12:45pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031 "2024-03-28T12:45:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.vosler](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@james.vosler](https://forum.inductiveautomation.com/u/james.vosler)\
**Post date:** [March 28, 2024, 12:45pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031/1 "2024-03-28T12:45:23Z")

</div>

Is there a way to send http requests to webdev handlers on the same gateway/jvm as the request sender? Both system.net.httpGet(...) and system.net.httpClient(...).get(...) return connection errors when I attempt this. Both work when connecting to other gateways.

Background: Client and server projects are designed to run on different gateways. I'd like to have the implementation not care which gateway the projects are running on, but the normal methods appear to not work in a loopback configuration.

Workaround: The fallback is to configure it to use system.util.sendMessage(...) if they are running on the same gateway.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 28, 2024, 12:48pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031/2 "2024-03-28T12:48:01Z")

</div>

> [@james.vosler](#):
>
> system.net.httpGet(...) and system.net.httpClient(...).get(...) return connection errors when I attempt this.

Really? What errors? What URL are you using?

---

<div class="post-metadata">

**Author:** ![james.vosler](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@james.vosler](https://forum.inductiveautomation.com/u/james.vosler)\
**Post date:** [March 28, 2024, 12:56pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031/3 "2024-03-28T12:56:01Z")

</div>

There's nothing special in the url. It's one of many on our dev server.

> [https://domain.name:8043/system/webdev/project2/ProdProc/1?custid=0&auth=0](https://domain.name:8043/system/webdev/project2/ProdProc/1?custid=0&auth=0)

The system.net.httpGet error is:

> Caused by: org.python.core.PyException: IOError: Connect timed out

The system.net.httpClient().get error is:

> Caused by: java.net.ConnectException: HTTP connect timed out

Both work fine when called from a script console, so the error appears to be more jvm centric than gateway centric.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 28, 2024, 1:03pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031/4 "2024-03-28T13:03:25Z")

</div>

Hmm, well fundamentally this works, I just tried it on a local gateway to confirm it.

There must be something going on with your environment that is preventing this from working.

---

<div class="post-metadata">

**Author:** ![james.vosler](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@james.vosler](https://forum.inductiveautomation.com/u/james.vosler)\
**Post date:** [March 28, 2024, 2:30pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031/5 "2024-03-28T14:30:18Z")

</div>

I created a test api locally (no cert) and all worked well.  
I created the same test on our dev server (with cert) and the problem shows up.  
The test apis return the default python resource 'hello world' response.

Neither the test api nor the original target api had 'Require HTTPS' checked.

The connection timeout also occurs when attempting to access the dev (with cert) api(s) from the web browser using http and port 8088.

Setting this 'Require HTTPS' checkbox had no effect on the api behavior.

---

<div class="post-metadata">

**Author:** ![james.vosler](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@james.vosler](https://forum.inductiveautomation.com/u/james.vosler)\
**Post date:** [March 29, 2024, 2:08pm UTC](https://forum.inductiveautomation.com/t/webdev-loopback-connection-error/88031/6 "2024-03-29T14:08:49Z")

</div>

I confirmed this behavior on two additional Azure VMs. The one with the certificate installed gives a connection timeout, the one without the certificate responds normally.
