OPC UA MODULE Faulted after PC Reboot

There is an issue for OPC UA module I have to fix for my customer. I notice every time when i restart the PC, OPC UA module is Faulted, it takes 3-5 mins at least to start the services.
There is only one Siemens S7-1500 device configured under OPC UA. I have tried update Ignition version from 8.0.12 to 8.1.1 to 8.1.6. The issue still there. the screen shots and wrapper logs as below.

wrapper.log (111.3 KB)

My temporary work around: after pc done reboot, manually restart UDP TCP module and OPC UA module in sequence.

Still permanent fix needed.

Something is wrong with your system and is holding the connection to the internal DB open for longer than 30 seconds at a time, which is what caused the OPC UA module startup to fail and caused all the other timeout errors during startup.

You should probably call support to have them look at this with you. I don’t think the problem is with the OPC UA module itself, it just got caught by this other problem.

INFO   | jvm 1    | 2021/06/02 19:39:25 | E [g.ModuleManager               ] [11:39:25]: Error starting module com.inductiveautomation.opcua module-name=OPC-UA
INFO   | jvm 1    | 2021/06/02 19:39:25 | java.sql.SQLException: Connection is locked. Datasource only allows one connection at a time. More information was logged to the gateway console.
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.localdb.sqlite.SingleConnectionDatasource.getConnection(SingleConnectionDatasource.java:75)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.localdb.DelegatingDataSource.getConnection(DelegatingDataSource.java:60)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.localdb.Table.buildFor(Table.java:86)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.localdb.LocalDBManagerImpl.updatePersistentRecords(LocalDBManagerImpl.java:484)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.localdb.LocalDBManagerImpl.updatePersistentRecords(LocalDBManagerImpl.java:466)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.localdb.LocalDBManagerImpl.updatePersistentRecords(LocalDBManagerImpl.java:455)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager.registerDeviceType(DeviceManager.kt:146)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.opcua.OpcUaExtensionManager.registerDeviceType(OpcUaExtensionManager.kt:35)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.opcua.OpcUaModule.startup(OpcUaModule.kt:304)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.opcua.OpcUaModuleHook.startup(OpcUaModuleHook.kt)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.startup(ModuleManagerImpl.java:2433)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.startup(ModuleManagerImpl.java:411)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.IgnitionGateway.startupInternal(IgnitionGateway.java:1168)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.startup(RedundancyManagerImpl.java:288)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.IgnitionGateway.initRedundancy(IgnitionGateway.java:725)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.gateway.IgnitionGateway.lambda$initInternal$0(IgnitionGateway.java:659)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:538)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2021/06/02 19:39:25 | 	at java.base/java.lang.Thread.run(Unknown Source)

The log shows that system.device.listDevices() calls in some project script are hogging the internal DB connection.

As a work-around, don’t let that code call listDevices() until the gateway has been running for a couple minutes.

1 Like

I have remove my tag expression script which calls system.device.listDevices() every second. and the issue is solve.

Thanks for support

1 Like

thanks for the support