Webdev loopback connection error

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.

Really? What errors? What URL are you using?

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

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.

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.

1 Like

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.

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.