Gateway scripts not working

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!

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 and we can take a look.

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

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

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.

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.

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.