system.net.httpClient issue on particular machine

I am having a similar issue and I’ve uninstalled/re-installed designer a few times, but it doesn’t help.

Trying to run the example below in the script Console doesn’t work. But if I paste the same code in a MessageHandler and then use system.util.sendRequest. It works fine…

client = system.net.httpClient()

# Send a non-blocking request to an endpoint that will wait 3 seconds

promise = client.getAsync( "https://httpbin.org/delay/3" , params = { "a" : 1 , "b" : 2 })

A NoClassDefFound error almost always implicates a faulty upgrade process; the PyArgParser class called out in the OP (you don’t mention if you’re getting the exact same error) is always available in all scopes in Ignition, so the only way it couldn’t be available is if Ignition itself is using old code.

here’s the error I’m getting:

Java Traceback:
Traceback (most recent call last):
  File "<input>", line 5, in <module>
	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:94)

	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.get(JythonHttpClient.java:296)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

java.io.IOException: java.io.IOException: Unable to GET https://httpbin.org/get?a=1&b=2


	at org.python.core.Py.JavaError(Py.java:552)

	at org.python.core.Py.JavaError(Py.java:543)

	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)

	at org.python.core.PyObject.__call__(PyObject.java:438)

	at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)

	at org.python.core.PyMethod.__call__(PyMethod.java:228)

	at org.python.pycode._pyx26.f$0(<input>:10)

	at org.python.pycode._pyx26.call_function(<input>)

	at org.python.core.PyTableCode.call(PyTableCode.java:171)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.Py.runCode(Py.java:1614)

	at org.python.core.Py.exec(Py.java:1658)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)

	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:131)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:605)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:593)

	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)

	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

	at java.desktop/javax.swing.SwingWorker.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)

Caused by: java.io.IOException: Unable to GET https://httpbin.org/get?a=1&b=2

	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:94)

	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.get(JythonHttpClient.java:296)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)

	... 19 more

Caused by: java.net.ConnectException

	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(Unknown Source)

	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(Unknown Source)

	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:92)

	... 25 more

Caused by: java.net.ConnectException

	at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Unknown Source)

	at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(Unknown Source)

	at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(Unknown Source)

	at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Unknown Source)

	at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Unknown Source)

	at java.net.http/jdk.internal.net.http.ExchangeImpl.get(Unknown Source)

	at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Unknown Source)

	at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Unknown Source)

	at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Unknown Source)

	at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Unknown Source)

	at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(Unknown Source)

	at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture.handle(Unknown Source)

	at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(Unknown Source)

	at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)

	at java.net.http/jdk.internal.net.http.HttpClientImpl$DelegatingExecutor.execute(Unknown Source)

	at java.base/java.util.concurrent.CompletableFuture.completeAsync(Unknown Source)

	at java.net.http/jdk.internal.net.http.MultiExchange.responseAsync(Unknown Source)

	at java.net.http/jdk.internal.net.http.HttpClientImpl.sendAsync(Unknown Source)

	... 28 more

Caused by: java.nio.channels.UnresolvedAddressException

	at java.base/sun.nio.ch.Net.checkAddress(Unknown Source)

	at java.base/sun.nio.ch.SocketChannelImpl.connect(Unknown Source)

	at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(Unknown Source)

	at java.base/java.security.AccessController.doPrivileged(Native Method)

	... 51 more

Traceback (most recent call last):
  File "<input>", line 5, in <module>
	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:94)

	at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.get(JythonHttpClient.java:296)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

java.io.IOException: java.io.IOException: Unable to GET https://httpbin.org/get?a=1&b=2

Your local machine (at least within the context of Java) can't resolve httpbin.org. Are you behind a restrictive firewall, have custom DNS, custom hosts file, etc? Does google.com work, or some other test site? What about an internal site (even the gateway address itself?)

It's unrelated to the error in the original thread, so I split this off to a new thread.

I am behind a firewall that doesn’t allow access to external addresses.