Replacing the mariadb server after replication - Error - Waiting for changelog lock.

dilkha month ago

Hello.
The current scheme is as follows:

  1. The Traccar server itself is the (latest) debian 12 version.
  2. mariadb 10.11.9 debian 10 master server.
  3. mariadb 10.11.12 debian 12 slave server.

I started the transition from debian 10 to 12 and switched slave to master mode.
But Traccar does not stratify. Error Waiting for changelog lock.
Did an update DATABASECHANGELOGLOCK set LOCKED=0
The database was restarted, the Traccar.
It didn't help.
The line ended correctly.
I tried to stop Traccar, mariadb backup, transfer the database to slave and run it.
The Waiting for changelog lock pops up anyway.

I also noticed that when Traccar is launched, the fields LOCKED=1,LOCKGRANTED =now(), LOCKEDBY='unknown';
What can be done?

dilkha month ago

У меня есть подозрение в разнице версий mariadb.
По идее 10.11.9 и 10.11.12 не имеют глобальных отличий.
Может как нибудь запустить Траккар с отладкой запросов к БД?
Посмотреть на чем он останавливается?
Траккар останавливаю корректно. БД тоже выключаются корректно.

Anton Tananaeva month ago

What's in the logs?

dilkha month ago
INFO: Operating system name: Linux version: 6.1.0-31-amd64 architecture: amd64
INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 21.0.4+7-LTS
INFO: Memory limit heap: 492mb non-heap: 0mb
INFO: Character encoding: UTF-8
INFO: Version: 6.6
INFO: Starting server...
INFO: HikariPool-1 - Starting...
INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@9a7a808
INFO: HikariPool-1 - Start completed.
INFO: Clearing database change log checksums
INFO: Waiting for changelog lock....
INFO: Waiting for changelog lock....
INFO: Waiting for changelog lock....
INFO: Waiting for changelog lock....
INFO: Waiting for changelog lock....
INFO: Waiting for changelog lock....
ERROR: Main method error - Database is in a locked state. It could be due to early service termination on a previous launch. To unlock you can run this query: 'UPDATE DATABASECHANGELOGLOCK SET locked = 0'. Make sure the schema is up to date before unlocking the database. - DatabaseLockException (DatabaseModule:102 < <gener:-1 < *:-1 < ... < MainModule:138 < <gener:-1 < ...)
Anton Tananaeva month ago

Are you sure it's the first launch after clearing the lock?

dilkha month ago

Yes.
I stopped the Traccar completely.
Then I stopped mariadb.
I did an update DATABASECHANGELOGLOCK set LOCKED=0 on the new database.
But even so, the value was LOCKED=0.
And only then did he start the Traccar .

dilkh25 days ago

Now I did logging of sql queries.
The problem is similar after initialization.
It is in md5

SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'trr' AND TABLE_NAME='DATABASECHANGELOG'

SELECT MD5SUM FROM trr.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL