# Gateway scripts not working

**URL:** <https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685>\
**Category:** Ignition\
**Created:** [June 11, 2013, 10:18am UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685 "2013-06-11T10:18:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![d.laquidain](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@d.laquidain](https://forum.inductiveautomation.com/u/d.laquidain)\
**Post date:** [June 11, 2013, 10:18am UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/1 "2013-06-11T10:18:11Z")

</div>

Hello,

In an ignition gateway I have gateway scripts (tag change and timer). But, some days this scripts never run and the only way to make them run is restarting the gateway.

En the wrapper log I can see the next message:

10-jun-2013 9:03:01 com.google.common.eventbus.EventBus dispatch  
INFO | jvm 3 | 2013/06/10 09:03:01 | GRAVE: Could not dispatch event: [PublishResponse requestHandle=60419] to handler [wrapper public void com.inductiveautomation.xopc.client.stack.FilteredEventSubscriber.filterEvent(java.lang.Object)]  
INFO | jvm 3 | 2013/06/10 09:03:01 | java.lang.reflect.InvocationTargetException  
INFO | jvm 3 | 2013/06/10 09:03:01 | at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.lang.reflect.Method.invoke(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:68)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.google.common.eventbus.EventBus.post(EventBus.java:264)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.inductiveautomation.xopc.client.stack.UaClient$PublishRequestPump$QueueExecutionCallback.execute(UaClient.java:350)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.inductiveautomation.xopc.client.stack.UaClient$PublishRequestPump$QueueExecutionCallback.execute(UaClient.java:343)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at com.inductiveautomation.xopc.client.stack.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:59)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.FutureTask.run(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | at java.lang.Thread.run(Unknown Source)  
INFO | jvm 3 | 2013/06/10 09:03:01 | Caused by: java.lang.NullPointerException

Thanks!

---

<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:** [June 11, 2013, 4:24pm UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/2 "2013-06-11T16:24:45Z")

</div>

Hmm, unfortunately this error you’ve posted is unrelated. (It’s also been identified and should be fixed in the next 7.5.x and 7.6.x releases… you have a connection to a 3rd party OPC-UA server right?)

Maybe you can zip up your wrapper.log files and send them to [support@inductiveautomation.com](mailto:support@inductiveautomation.com) and we can take a look.

---

<div class="post-metadata">

**Author:** ![d.laquidain](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@d.laquidain](https://forum.inductiveautomation.com/u/d.laquidain)\
**Post date:** [June 11, 2013, 5:24pm UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/3 "2013-06-11T17:24:19Z")

</div>

Now Ignition is connected to a Kepware OPC UA Remote Server. It is also using the TCP driver of Ignition UA Server.  
This error always appears on Saturday (the company begins to rest this day) and when workers return on Monday the gateway scripts don´t run and I must to restart Ignitiont gateway.

When I force value tags to trigger a tag change gateway script, it doesn´t run. I have got timer gateway never script and it never runs.

I ´ve send you the wappers logs.

thanks

---

<div class="post-metadata">

**Author:** ![d.laquidain](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@d.laquidain](https://forum.inductiveautomation.com/u/d.laquidain)\
**Post date:** [June 24, 2013, 5:43pm UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/4 "2013-06-24T17:43:10Z")

</div>

Hello,

I still have the same problem. however I have been able to investage in more detail the situation.

Gateway scripts are running, however the commands "system.tag.writeToTag(“mytag”,value) do not run well. So, I don´t see the tags change.

ignition 7.5.9b, java 6\_45 and java7\_25.

Any ideas?

INFO | jvm 3 | 2013/06/23 21:50:25 | 23-jun-2013 21:50:25 com.google.common.eventbus.EventBus dispatch  
INFO | jvm 3 | 2013/06/23 21:50:25 | GRAVE: Could not dispatch event: [PublishResponse requestHandle=18] to handler [wrapper public void com.inductiveautomation.xopc.client.stack.FilteredEventSubscriber.filterEvent(java.lang.Object)]  
INFO | jvm 3 | 2013/06/23 21:50:25 | java.lang.reflect.InvocationTargetException  
INFO | jvm 3 | 2013/06/23 21:50:25 | at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.lang.reflect.Method.invoke(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:68)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.google.common.eventbus.EventBus.post(EventBus.java:264)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.inductiveautomation.xopc.client.stack.UaClient$PublishRequestPump$QueueExecutionCallback.execute(UaClient.java:368)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.inductiveautomation.xopc.client.stack.UaClient$PublishRequestPump$QueueExecutionCallback.execute(UaClient.java:361)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at com.inductiveautomation.xopc.client.stack.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:59)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.FutureTask.run(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:25 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:26 | at java.lang.Thread.run(Unknown Source)  
INFO | jvm 3 | 2013/06/23 21:50:26 | Caused by: java.lang.NullPointerException  
INFO | jvm 3 | 2013/06/23 21:50:26 | at com.inductiveautomation.xopc.client.stack.UaSubscription$NotificationHandling.onNotificationMessage(UaSubscription.java:230)  
INFO | jvm 3 | 2013/06/23 21:50:26 | at com.inductiveautomation.xopc.client.stack.UaSubscription$NotificationHandling.access$800(UaSubscription.java:227)  
INFO | jvm 3 | 2013/06/23 21:50:26 | at com.inductiveautomation.xopc.client.stack.UaSubscription$PublishResponseReceiver.onFilteredEvent(UaSubscription.java:218)  
INFO | jvm 3 | 2013/06/23 21:50:26 | at com.inductiveautomation.xopc.client.stack.UaSubscription$PublishResponseReceiver.onFilteredEvent(UaSubscription.java:162)  
INFO | jvm 3 | 2013/06/23 21:50:26 | at com.inductiveautomation.xopc.client.stack.FilteredEventSubscriber.filterEvent(FilteredEventSubscriber.java:27)  
INFO | jvm 3 | 2013/06/23 21:50:26 | … 19 more

---

<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:** [August 12, 2013, 9:47pm UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/5 "2013-08-12T21:47:26Z")

</div>

This error you’re seeing has been fixed in 7.5.10 and 7.6.2. That being said, it’s not related to your scripts not running.

You may need to start adding some debugging lines to your scripts to see when/where they run or error out.

---

<div class="post-metadata">

**Author:** ![gljuk](https://avatars.discourse-cdn.com/v4/letter/g/90ced4/32.png) [@gljuk](https://forum.inductiveautomation.com/u/gljuk)\
**Post date:** [November 8, 2013, 12:37pm UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/6 "2013-11-08T12:37:38Z")

</div>

Could you please confirm the problem with system.tag.write function is fixed. We are using ver. 7.6.2 and still have problems with tag values being not written. It does not matter, are these OPC tags or memory tags. We have done some tests and found out, that one execution after gateway restart the gateway on change script works ok and then it may stay working or may stop work.  
We have many GW scripts defined. Are there any limitations here?

Also we plan to try to use system.tag.writesyncronous function instead of system.tag.write function but we afraid it will increase the execution time of the script. Could you please comment the situation here?

Looking forward to your reply.

EDIT:  
We have inspected wrapper.log file for errors.  
INFO | jvm 1 | 2013/11/08 00:44:20 | ERROR [Provider[default] ] [00:44:20,626]: [[default]KP\_VOPSIKURVP/Register/Comms\_Comm\_Connect] Error writing to OPC address [[Merz]KP\_VOPSIKURVP.Register.Comm\_Comm\_Connect]. Result code: [OPERATION\_FAILED] Unspecified error  
INFO | jvm 1 | 2013/11/08 00:44:20 |  
INFO | jvm 1 | 2013/11/08 04:24:06 | ERROR [Provider[default] ] [04:24:05,993]: [[default]KP\_VOPSIKURVP/Register/Comms\_Comm\_Connect] Error writing to OPC address [[Merz]KP\_VOPSIKURVP.Register.Comm\_Comm\_Connect]. Result code: [OPERATION\_FAILED] Unspecified error  
INFO | jvm 1 | 2013/11/08 04:24:06 |  
INFO | jvm 1 | 2013/11/08 05:43:52 | ERROR [Provider[default] ] [05:43:52,126]: [[default]TAMMIKURVP/Register/Comms\_Comm\_Connect] Error writing to OPC address [[Merz]TAMMIKURVP.Register.Comm\_Comm\_Connect]. Result code: [OPERATION\_FAILED] Unspecified error  
INFO | jvm 1 | 2013/11/08 05:43:52 |  
INFO | jvm 1 | 2013/11/08 06:56:40 | WARN [Ignition\_Loader] [06:56:40,611]: (id=f9bec08e) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:56:56 | WARN [Ignition\_Loader] [06:56:56,104]: (id=cb45923f) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:56:56 | WARN [Ignition\_Loader] [06:56:56,106]: (id=91e9052c) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:57:08 | WARN [Ignition\_Loader] [06:57:08,515]: (id=e8de6024) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:57:08 | WARN [Ignition\_Loader] [06:57:08,520]: (id=ba6aa0e) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:58:13 | WARN [Ignition\_Loader] [06:58:13,246]: (id=33a7a264) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:58:13 | WARN [Ignition\_Loader] [06:58:13,249]: (id=f9bec08e) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 06:58:31 | WARN [Ignition\_Loader] [06:58:31,776]: (id=91e9052c) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 07:02:10 | WARN [Ignition\_Loader] [07:02:10,321]: (id=b9651467) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 07:02:10 | WARN [Ignition\_Loader] [07:02:10,324]: (id=a5c23e81) No scan class information found for tags. All returned data will be bad quality.  
INFO | jvm 1 | 2013/11/08 08:47:45 | WARN [Ignition\_Loader] [08:47:45,148]: (id=91e9052c) No scan class information found for tags. All returned data will be bad quality.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [November 21, 2013, 12:25am UTC](https://forum.inductiveautomation.com/t/gateway-scripts-not-working/6685/7 "2013-11-21T00:25:18Z")

</div>

Like Kevin said, it sounds like this is not related to scripts not running. You can use the print command in Ignition to print information out to the console (wrapper.log file if the print command is in a Gateway script) to check exactly what your script is doing.
