Ignition Version : 7.8.3
Hello all,
I have a stange behavior with shared scoped scripts. I have made a simple one to show the problem:
In Shared, i have a simple script :
def refreshTest():
retour = system.net.httpGet("https://github.com")
return retour
When I call it from the Script Console or a Button, it works just fine. When I put it in a TagEvent Script or Gateway timer script, the script fails and the logs read :
13:42:13 ScriptDispatcher ([#######]WS/TOP_TEST 1, valueChanged) Error executing tag event script: null Traceback (most recent call last): File "<tagevent:valueChanged>", line 6, in valueChanged File "<module:shared.WS>", line 72, in refreshTest IOError: github.com at org.python.core.Py.fromIOException(Py.java:215)
at org.python.core.Py.IOError(Py.java:178)
at com.inductiveautomation.ignition.common.script.builtin.AbstractNetUtilities.httpGet(AbstractNetUtilities.java:260)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:186)
at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.call(ScriptManager.java:427)
at org.python.core.PyObject.call(PyObject.java:387)
at org.python.core.PyObject.call(PyObject.java:391)
at org.python.pycode._pyx10.refreshTest$3(<module:shared.WSEDF.WS>:74)
at org.python.pycode._pyx10.call_function(<module:shared.WSEDF.WS>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:120)
at org.python.core.PyFunction.call(PyFunction.java:307)
at org.python.pycode.pyx9.valueChanged$1(<tagevent:valueChanged>:6)
at org.python.pycode.pyx9.call_function(<tagevent:valueChanged>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
at org.python.core.PyFunction.function___call(PyFunction.java:376)
at org.python.core.PyFunction.call(PyFunction.java:371)
at org.python.core.PyFunction.call(PyFunction.java:361)
at org.python.core.PyFunction.call(PyFunction.java:356)
at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:636)
at com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager$FunctionInvokerImpl.run(TagScriptManager.java:375)
at com.inductiveautomation.ignition.common.sqltags.scripts.AbstractTagScript.invoke(AbstractTagScript.java:34)
at com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager$Task.invoke(TagScriptManager.java:345)
at com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager$TagScriptDispatcher.run(TagScriptManager.java:310)
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:537)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)|
In both cases, i use the exact same instruction to execute my shared script :
shared.WS.refreshTest()
The Gateway and the client both run on the same machine (same internet settings for proxy).
My guess was that the Internet proxy settings would not apply to the JVM so I added those lines in the ignition.conf settings:
wrapper.java.additional.5=-Dhttp.proxyHost=myProxy
wrapper.java.additional.6=-Dhttp.proxyPort=myProxyPort
wrapper.java.additional.7=-Dhttp.nonProxyHosts="localhost|127.0.0.1"
#wrapper.java.additional.8=-Dcom.sun.net.ssl.checkRevocation=false
with no luck.
I'm a bit stuck with this. If anyone has an idea about all this, it would be very welcomed.
Regards