Introduction

This documentation provides resolutions to situations that you may encounter while running standalone CAST Dashboards.

liquibase.exception.DatabaseException: Expected single row from

Attempting to start a CAST Dashboard may result in the following error:

Caused by: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@54e43bfe but got 2
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:184) ~[liquibase-core-4.8.0.jar!/:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:195) ~[liquibase-core-4.8.0.jar!/:?]
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:190) ~[liquibase-core-4.8.0.jar!/:?]
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:288) ~[liquibase-core-4.8.0.jar!/:?]
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:247) ~[liquibase-core-4.8.0.jar!/:?]
at liquibase.Liquibase.lambda$update$1(Liquibase.java:214) ~[liquibase-core-4.8.0.jar!/:?]
docker restart <id|name of your container>

This error indicates that there are multiple rows in the table cast_dashboards.databasechangeloglock, where only one row is expected. The cast_dashboards schema stores data about roles, license key and users. First run the following query to check that this is indeed the case:

SELECT * FROM cast_dashboards.databasechangeloglock
ORDER BY id ASC

If two or more rows are returned, now run the following query to remove all but one row:

DELETE FROM cast_dashboards.databasechangeloglock
WHERE ctid NOT IN (
SELECT ctid
FROM cast_dashboards.databasechangeloglock
LIMIT 1
);

Finally restart the CAST Dashboard service to ensure the change is taken into account.