Failure Handling
Startup Failure
-
TM fails to start due to locked database
Context: Application does not become available when the database is locked. This error can occur, if the application has been stopped abruptly during database migration, thus a database lock has not removed properly.
Symptoms: 502 Bad Gateway errors, e.g. when trying to create application resources. Repeated restarts in short succession.
Solution: Check the logs for the service ticket_service. The logs may contain one of the following messages
Waiting for changelog lock.... liquibase.exception.LockException: Could not acquire change log lock Application run failedIf you don’t expect partial database migrations you can lift the lock, otherwise the database has to be repaired manually. To lift the lock, connect to the database used for TM and execute to following SQL-command:
SELECT * FROM TM_DATABASECHANGELOGLOCKVerify, that the returned result set has one entry and the LOCKED is set to 1.
To release the lock, run the following SQL-command:UPDATE TM_DATABASECHANGELOGLOCK SET LOCKED=0 where ID=1TM should recover itself and be available again.