Looks like there's some issue with Liquibase changelog table.
I only have these tables:
+------------------------+
| Tables_in_traccar |
+------------------------+
| DATABASECHANGELOG |
| DATABASECHANGELOGLOCK |
| TC_ATTRIBUTES |
| TC_CALENDARS |
| TC_COMMANDS |
| TC_DEVICES |
| TC_DEVICE_ATTRIBUTE |
| TC_DEVICE_COMMAND |
| TC_DEVICE_DRIVER |
| TC_DEVICE_GEOFENCE |
| TC_DEVICE_MAINTENANCE |
| TC_DEVICE_NOTIFICATION |
| TC_DRIVERS |
| TC_EVENTS |
| TC_GEOFENCES |
| TC_GROUPS |
| TC_GROUP_ATTRIBUTE |
| TC_GROUP_COMMAND |
| TC_GROUP_DRIVER |
| TC_GROUP_GEOFENCE |
| TC_GROUP_MAINTENANCE |
| TC_GROUP_NOTIFICATION |
| TC_MAINTENANCES |
| TC_NOTIFICATIONS |
| TC_POSITIONS |
| TC_SERVERS |
| TC_STATISTICS |
| TC_USERS |
| TC_USER_ATTRIBUTE |
| TC_USER_CALENDAR |
| TC_USER_COMMAND |
| TC_USER_DEVICE |
| TC_USER_DRIVER |
| TC_USER_GEOFENCE |
| TC_USER_GROUP |
| TC_USER_MAINTENANCE |
| TC_USER_NOTIFICATION |
| TC_USER_USER |
+------------------------+
38 rows in set (0.002 sec)
Is it this table?
MariaDB [traccar]> show fields from DATABASECHANGELOG;
+---------------+--------------+------+-----+----------------------+--------------------------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+----------------------+--------------------------------+
| ID | text | NO | | NULL | |
| AUTHOR | text | NO | | NULL | |
| FILENAME | text | NO | | NULL | |
| DATEEXECUTED | timestamp(6) | NO | | current_timestamp(6) | on update current_timestamp(6) |
| ORDEREXECUTED | int(10) | NO | | NULL | |
| EXECTYPE | text | NO | | NULL | |
| MD5SUM | text | YES | | NULL | |
| DESCRIPTION | text | YES | | NULL | |
| COMMENTS | text | YES | | NULL | |
| TAG | text | YES | | NULL | |
| LIQUIBASE | text | YES | | NULL | |
| CONTEXTS | text | YES | | NULL | |
| LABELS | text | YES | | NULL | |
| DEPLOYMENT_ID | text | YES | | NULL | |
+---------------+--------------+------+-----+----------------------+--------------------------------+
14 rows in set (0.002 sec)
First row:
MariaDB [traccar]> select * from DATABASECHANGELOG order by DATEEXECUTED desc limit 1;
+---------------+--------+---------------+----------------------------+---------------+----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+------+-----------+----------+--------+---------------+
| ID | AUTHOR | FILENAME | DATEEXECUTED | ORDEREXECUTED | EXECTYPE | MD5SUM | DESCRIPTION | COMMENTS | TAG | LIQUIBASE | CONTEXTS | LABELS | DEPLOYMENT_ID |
+---------------+--------+---------------+----------------------------+---------------+----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+------+-----------+----------+--------+---------------+
| changelog-3.3 | author | changelog-3.3 | 2020-06-29 02:36:59.701785 | 1 | EXECUTED | NULL | createTable tableName=users; addUniqueConstraint constraintName=uk\_user\_email, tableName=users; createTable tableName=devices; addUniqueConstraint constraintName=uk\_device\_uniqueid, tableName=devices; createTable tableName=user\_device; addForeignK... | | NULL | 3.5.3 | NULL | NULL | 1680654364 |
+---------------+--------+---------------+----------------------------+---------------+----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+------+-----------+----------+--------+---------------+
1 row in set (0.001 sec)
Strange, I got it running by adding the driver:local to the list of volumes:
volumes:
traccar-db:
driver: local
traccar-mysql:
driver: local
BUT! it seems like when I use the H2-to-MySQL converter, all the table names are in upper case,
When I starts traccar it deletes the uppercase tables and creates an empty set of lowercase tables.
I guess I should lowercase the table names.
Should the field names be lowercased too?
You need to make sure names are treated as case-insensitive.
I finally got it running.
I started the new server, and let it create a fresh empty mysql db,
Then modified the H2-to-mysql to REPLACE INTO the data from H2 to MySql (and lowercasing table and column names)
Now I just wonder how long it will take for the clients (gps-devices) to look up the new IP for the new server.
I know this is after 2 years... but I recently came across with the same issue. The EXECTYPE is a field of Liquibase's table DATABASECHANGELOG, see the doc here https://docs.liquibase.com/concepts/tracking-tables/databasechangelog-table.html
EXECTYPE VARCHAR(10) Description of how the changeset was executed. Possible values include EXECUTED, FAILED, SKIPPED, RERAN, and MARK_RAN.
In your case, you had a backsplash in that field MARK_RAN, and that's why Liquibase errored out.
As for where did that unwanted backsplash come from, that probably takes a bit peek into the DATABASECHANGELOG table. In my case, the error stated No enum constant liquibase.changelog.ChangeSet.ExecType.3.5.3, wherein the numeric isn't among the accepted values for this field and I did find that numeric in the table. Removing that row eliminated the error immediately but broke other stuff - of course that's another story and issue that needs to be addressed. All to say it needs to be find out where the "MARK_RUN" resides. And this also echoes why it worked out for you when you destroyed the old database and started over with a clean slate - because the bad data was wiped out.
I'm trying to run traccar with mariadb in docker on a new installation
Initially I had the new traccar (image traccar:latest) running on the h2 database, with no old data,
I then switched to mysql, having converted the h2 to mysql with a modified version of https://github.com/pedromartins4/H2-to-MySQL
But traccar stops with this;