Hello all the server that hosts Ignition crashed and after that i am getting the following errors. Does anyone know why this is happening and what we can do to prevent it?:
I'm also experiencing this error in 8.1.21. It might be related to my store and forward events that are backed up. Ignition can't find any tables in my database (Invalid object name 'sqlth_drv'.) Seems like it's defaulting to the Master database even though I have specified the correct database. @rahman.tarek do you have this error too?
There is a problem checking the tag history database tables during initialization of the store and forward engine which could prevent tag history data from being forwarded properly.
Both of you should probably contact support. From some looking around our bug tracker, this looks similar to something our QA team encountered during automation runs, but we weren't able to track down the root cause of. More information could certainly help.
The solution for me was to change the default schema on my database login. I had to create a dedicated database login instead of using my own dbo account.
FWIW, they are also accumulating some quarantined items in their S&F caches, most of which succeed on retry. The description in the UI looks like some of the log entries: (null, _exempt_, 2), but that detail does not show in the quarantine's XML export. Also, successful retries do not fill in all of the gaps in the data.
I was able to restart the client's Ignition yesterday evening to enable the full traces from fast throws. The abbreviated Errors above expand as follows:
2023/02/24 07:24:45.345 | E [S.S.HsqlDataStore ] [12:24:45]: Error storing to data cache. store-forward-name=HomerRD
2023/02/24 07:24:45.345 | java.lang.NullPointerException: null
2023/02/24 07:24:45.345 | at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.syncdStoreData(AbstractDatasourceStore.java:313)
2023/02/24 07:24:45.345 | at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.storeQuarantinedData(AbstractDatasourceStore.java:268)
2023/02/24 07:24:45.345 | at com.inductiveautomation.ignition.gateway.history.stores.MemoryStore$BasicForwardTransaction.storeQuarantineData(MemoryStore.java:325)
2023/02/24 07:24:45.345 | at com.inductiveautomation.ignition.gateway.history.stores.MemoryStore$BasicForwardTransaction.markFailed(MemoryStore.java:281)
2023/02/24 07:24:45.345 | at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:151)
This client is getting many of these:
$ grep 'E \[S.S.HsqlDataStore' wrapper_20230224_0724.log |wc -l
549
Yes, the work-around in the meantime is to disable the S&F disk caches, rename/delete the corresponding folders in {installdir}/data/datacache, then re-enable the disk caches. I skipped the last step, as the client's system doesn't need disk caching. (Generously provisioned, lightly loaded.) The trend gaps are gone.
The remaining issue, the attempt to insert null into the DB during a MemoryForwardTransaction, is still happening but does not appear to be causing any ill effect. There's nothing to look at with kindling, as there are no quarantined records now. The log entry suggests that the error is in a metadata table, not a history partition.
{ I closed the support ticket, as the client-visible problem is fixed. }
Does this look familiar? (I'm not seeing mention of MemoryForwardTransaction though)
Wrapper Log
INFO | jvm 1 | 2024/04/18 10:45:03 | W [S.S.TagHistoryDatasourceSink ] [15:45:03]: There is a problem checking the tag history database tables during initialization of the store and forward engine which could prevent tag history data from being forwarded properly. Trying again in 60 seconds.
INFO | jvm 1 | 2024/04/18 10:45:03 | com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'id', table 'IGN_HIST_CS.dbo.sqlth_drv'; column does not allow nulls. INSERT fails.
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1662)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:615)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:537)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7417)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3488)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:262)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:237)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:483)
INFO | jvm 1 | 2024/04/18 10:45:03 | at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
INFO | jvm 1 | 2024/04/18 10:45:03 | at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.executeUpdate(SRConnectionWrapper.java:981)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepUpdate(SRConnectionWrapper.java:181)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.loadOrCreateSystemDetails(TagHistoryDatasourceSink.java:483)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.getSystemDetails(TagHistoryDatasourceSink.java:433)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:296)
INFO | jvm 1 | 2024/04/18 10:45:03 | at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:544)
INFO | jvm 1 | 2024/04/18 10:45:03 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO | jvm 1 | 2024/04/18 10:45:03 | at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO | jvm 1 | 2024/04/18 10:45:03 | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
INFO | jvm 1 | 2024/04/18 10:45:03 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO | jvm 1 | 2024/04/18 10:45:03 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO | jvm 1 | 2024/04/18 10:45:03 | at java.base/java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2024/04/18 10:46:03 | I [S.S.TagHistoryDatasourceSink ] [15:46:03]: Tag history tables verified successfully.