[IGN-4941]Stale Schema Records

New installation of 8.0.16.

Any ideas on how to fix the issue causing the logger to show the following message every 30 minutes?

Error thrown while attempting to cleanup stale schema records

java.sql.SQLNonTransientConnectionException: connection exception: closed

at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)

at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)

at org.hsqldb.jdbc.JDBCPreparedStatement.(Unknown Source)

at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)

at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:292)

at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:292)

at com.inductiveautomation.ignition.gateway.localdb.DelegatingDataSource$DelegatingConnection.prepareStatement(DelegatingDataSource.java:281)

at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.cleanupSchemas(AbstractDatasourceStore.java:455)

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:565)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.hsqldb.HsqlException: connection exception: closed

at org.hsqldb.error.Error.error(Unknown Source)

at org.hsqldb.error.Error.error(Unknown Source)

at org.hsqldb.Session.execute(Unknown Source)

... 13 common frames omitted

A bit more information…

This license does NOT include SQL Bridge and the error started after a project was imported. The project does NOT use transaction groups.

That trace looks like it comes from the Tag Historian, not any leftover from the SQL Bridge module.

There are no tags in this gateway either…

Got nothing else. Might need someone at IA to look closer at the code around that call stack. You may be asked to try a nightly or RC, though. Or wait for a release today. (:

Version is 8.0.16.

The tag provider for the project was set to None, I changed it to default, error is still being thrown.

8.0.17 RC1 is avaiable now.

The development system uses the same Ignition version with no errors. Development is a Linux box, Production is a Windows box if that makes a difference.

Hovering over the error in Logs displays “StoreAndForward.Sink.HsqlDataStore”

Did you ever find anything on this? I am seeing the same error. I was having some issues with Store and Forward and manually cleared SF by deleting the cache files, but after starting services back up I am seeing this error.

I started seeing the error after configuring the gateway, before importing any projects or transaction groups. Exporting and importing the gateway cleared up the issue.

I am getting this error every 30 minutes too. It started yesterday when I deleted an unused database connection I had deactivated about a year ago.

HsqlDataStore	03Mar2021 08:48:42	Error thrown while attempting to cleanup stale schema records
java.sql.SQLNonTransientConnectionException: connection exception: closed

at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)

at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)

at org.hsqldb.jdbc.JDBCPreparedStatement.(Unknown Source)

at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)

at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:292)

at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:292)

at com.inductiveautomation.ignition.gateway.localdb.DelegatingDataSource$DelegatingConnection.prepareStatement(DelegatingDataSource.java:281)

at com.inductiveautomation.ignition.gateway.history.stores.AbstractDatasourceStore.cleanupSchemas(AbstractDatasourceStore.java:455)

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:565)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.hsqldb.HsqlException: connection exception: closed

at org.hsqldb.error.Error.error(Unknown Source)

at org.hsqldb.error.Error.error(Unknown Source)

at org.hsqldb.Session.execute(Unknown Source)


Yes, in my case, it seems related to adding and disabling a new database connection.

When it started after disabling a connection.


So instead of disabling it, I just deleted it.

Yes, I disabled and then deleted the database connection, but am still getting the periodic (every 30 minutes) error messages about it. I’m not sure how to fix it and get rid of the “HsqlDataStore” “Error thrown while attempting to cleanup stale records” error.

I found that creating and restoring a gateway backup resolves the issue.

Does your gateway have SQL bridge licensed? The client where I have the issue does NOT have a SQL bridge license, other clients on the same version (8.1.0) that DO have SQL bridge do not have the issue.

2 Likes

Yes, the gateway with the issue has a licensed SQL bridge, it is running Ignition 8.1.1 and SQL bridge 10.1.1.

I can try to restore a backup, I’ll have to plan in the downtime though, so It’ll likely be a few days until I can try it out. I’ll let you know if it works for me. Thanks

For now it looks like this:

This is the solution, mcgheeiv.
Doing the backup and restore of the gateway solved the recurring HsqlDataStore error every 30 minutes. Deleting my disabled database connection is not enough to stop the error.

1 Like

For reference, I have had this same error. Due to deleting a database connection, which did not delete the Store and Forward entry, nor the Historical Tag Provider entry…

I tried rebooting the gateway which did not fix it. I then tried the backup/restore suggestion.
This did seem to stop the HsqlDataStore error from showing up, but unfortunately the gateway still has references to the deleted database connection…

I have a new, few days old, installation of v8.1.10 (and today upgraded to v8.1.11) Ignition gateway in my office for a new project. I’ve never deleted any database connection (I have two: one for PostgreSQL and one for MSSQL), and I have no history tags and nothing in Store&Forward…
And this is my log:


I did not try backup&restore yet…
And it’s strange that no one from IA has commented on this…

That looks like the internal DB, not one of your two connections.

Well, the previous comments suggested that it has something to do with DB connections…
And from these logs, you can’t figure it out…