There is documentation available for it
Are You thinking about that link ?
https://www.traccar.org/upgrading-traccar/
Yes.
Well, there is nothing about my problems. Reading document it looks like it should work but it does not in my case.
What about that error:
2020-09-20 11:20:11 ERROR: Main method error - Duplicate column name 'mailsent' - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:292 < Main:137 < ...)
Well, you haven't provided any details on how you upgraded. From the error message it seems like migration failed and you tried to unlock the database manually, which ended up in an invalid state.
I have installed new version traccar and then I have restored database from old version (3.9)
After restoring database I have just started new version: "systmctl start traccar" and it generates above error.
In that case you should examine the log again and see if there's anything else of interest. For example, if there were restarts and some failures.
Yes, there are permanent restarts. Actually after 24 hours log file is 32 MBytes of size and everytime repeats such debug log:
It repeats every 15 seconds.
2020-09-21 07:38:13 INFO: HikariPool-1 - Starting...
2020-09-21 07:38:13 WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-09-21 07:38:13 INFO: HikariPool-1 - Start completed.
2020-09-21 07:38:14 INFO: Clearing database change log checksums
2020-09-21 07:38:14 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 07:38:14 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 07:38:14 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 07:38:14 INFO: Successfully acquired change log lock
2020-09-21 07:38:14 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 07:38:14 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = NULL
2020-09-21 07:38:14 INFO: Successfully released change log lock
2020-09-21 07:38:14 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 07:38:14 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 07:38:14 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 07:38:14 INFO: Successfully acquired change log lock
2020-09-21 07:38:14 INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 07:38:14 INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 07:38:15 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 07:38:15 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 07:38:15 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 07:38:15 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ea6f202534dc7845fd1a49e1d8384d9c' WHERE ID = 'changelog-3.3' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.3'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:194e3ae7ec6d201917136e04a26e237b' WHERE ID = 'changelog-3.5' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.5'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1ec7941b03749f24e365bc6126b07e1a' WHERE ID = 'changelog-3.6' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.6'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:2e444e379f31d0b8e09273ec7ffe87a0' WHERE ID = 'changelog-3.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:974c33d2fb399ef6477c3897450fb078' WHERE ID = 'changelog-3.7-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:74d68027951f8d2ae6bb2e24df8365bc' WHERE ID = 'changelog-3.8' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.8'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:34822842d65deb843a7d16f857d52ecc' WHERE ID = 'changelog-3.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.9'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:d59fa93049c031a8bcfbc02958c1942c' WHERE ID = 'changelog-4.0-clean' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1adabae3238e02ccc97cc422359a58a0' WHERE ID = 'changelog-4.0-clean-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:e1ddbe83e1ecf856a912755fc118f82e' WHERE ID = 'changelog-3.10' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:191c21d8f0f921845cf93bbc9d0639b9' WHERE ID = 'changelog-3.10-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ad1f63566e8d08812fbf0b93a118ef6e' WHERE ID = 'changelog-3.10-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:127b36b9d32a9d236df51d19b18c3766' WHERE ID = 'changelog-3.7-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 07:38:15 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:7800f890b9706a480bd5a79b591b6ca7' WHERE ID = 'changelog-3.11' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.11'
2020-09-21 07:38:15 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 07:38:15 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 07:38:15 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 07:38:16 INFO: ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL
2020-09-21 07:38:16 ERROR: Change Set changelog-3.12::changelog-3.12::author failed. Error: Duplicate column name 'mailsent' [Failed SQL: (1060) ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL]
2020-09-21 07:38:16 INFO: Successfully released change log lock
2020-09-21 07:38:16 ERROR: Main method error - Duplicate column name 'mailsent' - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:292 < Main:137 < ...)
Well, you need to go to the first time it happened and check logs there. It will likely show that migration timed out.
I have restored database again and I have started traccar on newly restored database.
After some initial DATABABSE ALTERING it restarts again every several seconds.
Here is initial log of first starts:
2020-09-21 08:37:50 INFO: HikariPool-1 - Starting...
2020-09-21 08:37:50 WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-09-21 08:37:50 INFO: HikariPool-1 - Start completed.
2020-09-21 08:37:50 INFO: Clearing database change log checksums
2020-09-21 08:37:51 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:37:51 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:37:51 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 08:37:51 INFO: Successfully acquired change log lock
2020-09-21 08:37:51 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 08:37:51 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = NULL
2020-09-21 08:37:51 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = NULL
2020-09-21 08:37:51 INFO: Successfully released change log lock
2020-09-21 08:37:51 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:37:51 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:37:51 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 08:37:51 INFO: Successfully acquired change log lock
2020-09-21 08:37:51 INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 08:37:51 INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 08:37:52 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 08:37:52 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 08:37:52 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 08:37:52 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ea6f202534dc7845fd1a49e1d8384d9c' WHERE ID = 'changelog-3.3' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.3'
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:194e3ae7ec6d201917136e04a26e237b' WHERE ID = 'changelog-3.5' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.5'
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1ec7941b03749f24e365bc6126b07e1a' WHERE ID = 'changelog-3.6' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.6'
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:2e444e379f31d0b8e09273ec7ffe87a0' WHERE ID = 'changelog-3.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:974c33d2fb399ef6477c3897450fb078' WHERE ID = 'changelog-3.7-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:74d68027951f8d2ae6bb2e24df8365bc' WHERE ID = 'changelog-3.8' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.8'
2020-09-21 08:37:52 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:34822842d65deb843a7d16f857d52ecc' WHERE ID = 'changelog-3.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.9'
2020-09-21 08:37:52 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 08:37:52 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 08:37:52 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 08:37:52 INFO: Marking ChangeSet: changelog-4.0-clean::changelog-4.0-clean::author ran despite precondition failure due to onFail='MARK_RAN':
./schema/changelog-master.xml : Not precondition failed
2020-09-21 08:37:52 INFO: SELECT MAX(ORDEREXECUTED) FROM traccar.DATABASECHANGELOG
2020-09-21 08:37:52 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-4.0-clean', 'author', 'changelog-4.0-clean', NOW(), 8, '8:d59fa93049c031a8bcfbc02958c1942c', 'createTable tableName=tc_attributes; createTable tableName=tc_calendars; createTable tableName=tc_commands; createTable tableName=tc_device_attribute; createTable tableName=tc_device_command; createTable tableName=tc_device_driver; createTable tab...', '', 'MARK_RAN', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:52 INFO: Marking ChangeSet: changelog-4.0-clean::changelog-4.0-clean-common::author ran despite precondition failure due to onFail='MARK_RAN':
./schema/changelog-master.xml : Not precondition failed
2020-09-21 08:37:52 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-4.0-clean-common', 'author', 'changelog-4.0-clean', NOW(), 9, '8:1adabae3238e02ccc97cc422359a58a0', 'addForeignKeyConstraint baseTableName=tc_groups, constraintName=fk_groups_groupid, referencedTableName=tc_groups; addForeignKeyConstraint baseTableName=tc_user_user, constraintName=fk_user_user_manageduserid, referencedTableName=tc_users', '', 'MARK_RAN', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:52 INFO: CREATE TABLE traccar.calendars (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(128) NOT NULL, data BLOB NOT NULL, attributes VARCHAR(4000) NOT NULL, CONSTRAINT PK_CALENDARS PRIMARY KEY (id))
2020-09-21 08:37:52 INFO: Table calendars created
2020-09-21 08:37:52 INFO: CREATE TABLE traccar.user_calendar (userid INT NOT NULL, calendarid INT NOT NULL)
2020-09-21 08:37:52 INFO: Table user_calendar created
2020-09-21 08:37:52 INFO: ALTER TABLE traccar.user_calendar ADD CONSTRAINT fk_user_calendar_userid FOREIGN KEY (userid) REFERENCES traccar.users (id) ON DELETE CASCADE
2020-09-21 08:37:52 INFO: Foreign key constraint added to user_calendar (userid)
2020-09-21 08:37:52 INFO: ALTER TABLE traccar.user_calendar ADD CONSTRAINT fk_user_calendar_geofenceid FOREIGN KEY (calendarid) REFERENCES traccar.calendars (id) ON DELETE CASCADE
2020-09-21 08:37:52 INFO: Foreign key constraint added to user_calendar (calendarid)
2020-09-21 08:37:52 INFO: ALTER TABLE traccar.geofences ADD calendarid INT NULL
2020-09-21 08:37:52 INFO: Columns calendarid(INT) added to geofences
2020-09-21 08:37:52 INFO: ALTER TABLE traccar.geofences ADD CONSTRAINT fk_geofence_calendar_calendarid FOREIGN KEY (calendarid) REFERENCES traccar.calendars (id) ON UPDATE RESTRICT ON DELETE SET NULL
2020-09-21 08:37:53 INFO: Foreign key constraint added to geofences (calendarid)
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.positions ADD accuracy DOUBLE DEFAULT 0 NOT NULL, ADD network VARCHAR(4000) NULL
2020-09-21 08:37:53 INFO: Columns accuracy(DOUBLE),network(VARCHAR(4000)) added to positions
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.users ADD userlimit INT DEFAULT 0 NULL
2020-09-21 08:37:53 INFO: Columns userlimit(INT) added to users
2020-09-21 08:37:53 INFO: CREATE TABLE traccar.user_user (userid INT NOT NULL, manageduserid INT NOT NULL)
2020-09-21 08:37:53 INFO: Table user_user created
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.user_user ADD CONSTRAINT fk_user_user_userid FOREIGN KEY (userid) REFERENCES traccar.users (id) ON DELETE CASCADE
2020-09-21 08:37:53 INFO: Foreign key constraint added to user_user (userid)
2020-09-21 08:37:53 INFO: UPDATE traccar.users SET devicelimit = -1 WHERE devicelimit = 0
2020-09-21 08:37:53 INFO: Data updated in users
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.users ALTER devicelimit DROP DEFAULT
2020-09-21 08:37:53 INFO: Default value dropped from users.devicelimit
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.users ALTER devicelimit SET DEFAULT -1
2020-09-21 08:37:53 INFO: Default value added to users.devicelimit
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.users ADD devicereadonly BIT(1) DEFAULT 0 NULL
2020-09-21 08:37:53 INFO: Columns devicereadonly(BOOLEAN) added to users
2020-09-21 08:37:53 INFO: ChangeSet changelog-3.10::changelog-3.10::author ran successfully in 1091ms
2020-09-21 08:37:53 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-3.10', 'author', 'changelog-3.10', NOW(), 10, '8:e1ddbe83e1ecf856a912755fc118f82e', 'createTable tableName=calendars; createTable tableName=user_calendar; addForeignKeyConstraint baseTableName=user_calendar, constraintName=fk_user_calendar_userid, referencedTableName=users; addForeignKeyConstraint baseTableName=user_calendar, cons...', '', 'EXECUTED', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.user_user ADD CONSTRAINT fk_user_user_manageduserid FOREIGN KEY (manageduserid) REFERENCES traccar.users (id) ON DELETE CASCADE
2020-09-21 08:37:53 INFO: Foreign key constraint added to user_user (manageduserid)
2020-09-21 08:37:53 INFO: ChangeSet changelog-3.10::changelog-3.10-notmssql::author ran successfully in 161ms
2020-09-21 08:37:53 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-3.10-notmssql', 'author', 'changelog-3.10', NOW(), 11, '8:191c21d8f0f921845cf93bbc9d0639b9', 'addForeignKeyConstraint baseTableName=user_user, constraintName=fk_user_user_manageduserid, referencedTableName=users', '', 'EXECUTED', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:53 INFO: Marking ChangeSet: changelog-3.10::changelog-3.10-mssql::author ran despite precondition failure due to onFail='MARK_RAN':
./schema/changelog-master.xml : DBMS Precondition failed: expected mssql, got mysql
2020-09-21 08:37:53 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-3.10-mssql', 'author', 'changelog-3.10', NOW(), 12, '8:ad1f63566e8d08812fbf0b93a118ef6e', 'sql', '', 'MARK_RAN', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:53 INFO: Marking ChangeSet: changelog-3.10::changelog-3.7-mssql::author ran despite precondition failure due to onFail='MARK_RAN':
./schema/changelog-master.xml : DBMS Precondition failed: expected mssql, got mysql
2020-09-21 08:37:53 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-3.7-mssql', 'author', 'changelog-3.10', NOW(), 13, '8:127b36b9d32a9d236df51d19b18c3766', 'sql', '', 'MARK_RAN', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.users ADD phone VARCHAR(128) NULL
2020-09-21 08:37:53 INFO: Columns phone(VARCHAR(128)) added to users
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.notifications ADD sms BIT(1) DEFAULT 0 NULL
2020-09-21 08:37:53 INFO: Columns sms(BOOLEAN) added to notifications
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.server ADD devicereadonly BIT(1) DEFAULT 0 NULL
2020-09-21 08:37:53 INFO: Columns devicereadonly(BOOLEAN) added to server
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.server ADD timezone VARCHAR(128) NULL
2020-09-21 08:37:53 INFO: Columns timezone(VARCHAR(128)) added to server
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.users ADD timezone VARCHAR(128) NULL
2020-09-21 08:37:53 INFO: Columns timezone(VARCHAR(128)) added to users
2020-09-21 08:37:53 INFO: ChangeSet changelog-3.11::changelog-3.11::author ran successfully in 233ms
2020-09-21 08:37:53 INFO: INSERT INTO traccar.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, `DESCRIPTION`, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-3.11', 'author', 'changelog-3.11', NOW(), 14, '8:7800f890b9706a480bd5a79b591b6ca7', 'addColumn tableName=users; addColumn tableName=notifications; addColumn tableName=server; addColumn tableName=server; addColumn tableName=users', '', 'EXECUTED', NULL, NULL, '3.10.1', '0670272159')
2020-09-21 08:37:53 INFO: ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL
2020-09-21 08:37:54 INFO: Columns mailsent(INT),smssent(INT),geocoderrequests(INT),geolocationrequests(INT) added to statistics
2020-09-21 08:37:54 INFO: CREATE TABLE traccar.attributes (id INT AUTO_INCREMENT NOT NULL, `description` VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, attribute VARCHAR(128) NOT NULL, expression VARCHAR(4000) NOT NULL, CONSTRAINT PK_ATTRIBUTES PRIMARY KEY (id))
2020-09-21 08:37:54 INFO: Table attributes created
2020-09-21 08:37:54 INFO: CREATE TABLE traccar.user_attribute (userid INT NOT NULL, attributeid INT NOT NULL)
2020-09-21 08:37:54 INFO: Table user_attribute created
2020-09-21 08:37:54 INFO: ALTER TABLE traccar.user_attribute ADD CONSTRAINT fk_user_attribute_userid FOREIGN KEY (userid) REFERENCES traccar.users (id) ON DELETE CASCADE
2020-09-21 08:37:54 INFO: Foreign key constraint added to user_attribute (userid)
2020-09-21 08:37:54 INFO: ALTER TABLE traccar.user_attribute ADD CONSTRAINT fk_user_attribute_attributeid FOREIGN KEY (attributeid) REFERENCES traccar.attributes (id) ON DELETE CASCADE
2020-09-21 08:37:54 INFO: Foreign key constraint added to user_attribute (attributeid)
2020-09-21 08:37:54 INFO: CREATE TABLE traccar.group_attribute (groupid INT NOT NULL, attributeid INT NOT NULL)
2020-09-21 08:37:54 INFO: Table group_attribute created
2020-09-21 08:37:54 INFO: ALTER TABLE traccar.group_attribute ADD CONSTRAINT fk_group_attribute_groupid FOREIGN KEY (groupid) REFERENCES traccar.`groups` (id) ON DELETE CASCADE
2020-09-21 08:37:54 INFO: Foreign key constraint added to group_attribute (groupid)
2020-09-21 08:37:54 INFO: ALTER TABLE traccar.group_attribute ADD CONSTRAINT fk_group_attribute_attributeid FOREIGN KEY (attributeid) REFERENCES traccar.attributes (id) ON DELETE CASCADE
2020-09-21 08:37:54 INFO: Foreign key constraint added to group_attribute (attributeid)
2020-09-21 08:37:54 INFO: CREATE TABLE traccar.device_attribute (deviceid INT NOT NULL, attributeid INT NOT NULL)
2020-09-21 08:37:54 INFO: Table device_attribute created
2020-09-21 08:37:54 INFO: ALTER TABLE traccar.device_attribute ADD CONSTRAINT fk_device_attribute_deviceid FOREIGN KEY (deviceid) REFERENCES traccar.devices (id) ON DELETE CASCADE
2020-09-21 08:37:55 INFO: Foreign key constraint added to device_attribute (deviceid)
2020-09-21 08:37:55 INFO: ALTER TABLE traccar.device_attribute ADD CONSTRAINT fk_device_attribute_attributeid FOREIGN KEY (attributeid) REFERENCES traccar.attributes (id) ON DELETE CASCADE
2020-09-21 08:37:55 INFO: Foreign key constraint added to device_attribute (attributeid)
2020-09-21 08:37:55 INFO: ALTER TABLE traccar.device_geofence DROP FOREIGN KEY fk_user_device_geofence_deviceid
2020-09-21 08:37:55 ERROR: Change Set changelog-3.12::changelog-3.12::author failed. Error: Can't DROP 'fk_user_device_geofence_deviceid'; check that column/key exists [Failed SQL: (1091) ALTER TABLE traccar.device_geofence DROP FOREIGN KEY fk_user_device_geofence_deviceid]
2020-09-21 08:37:55 INFO: Successfully released change log lock
2020-09-21 08:37:55 ERROR: Main method error - Can't DROP 'fk_user_device_geofence_deviceid'; check that column/key exists - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:292 < Main:137 < ...)
2020-09-21 08:38:05 INFO: HikariPool-1 - Starting...
2020-09-21 08:38:05 WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-09-21 08:38:06 INFO: HikariPool-1 - Start completed.
2020-09-21 08:38:06 INFO: Clearing database change log checksums
2020-09-21 08:38:06 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:06 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:06 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 08:38:06 INFO: Successfully acquired change log lock
2020-09-21 08:38:06 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 08:38:06 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = NULL
2020-09-21 08:38:06 INFO: Successfully released change log lock
2020-09-21 08:38:06 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:06 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:06 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 08:38:06 INFO: Successfully acquired change log lock
2020-09-21 08:38:06 INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 08:38:06 INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 08:38:07 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 08:38:07 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 08:38:07 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 08:38:07 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ea6f202534dc7845fd1a49e1d8384d9c' WHERE ID = 'changelog-3.3' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.3'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:194e3ae7ec6d201917136e04a26e237b' WHERE ID = 'changelog-3.5' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.5'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1ec7941b03749f24e365bc6126b07e1a' WHERE ID = 'changelog-3.6' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.6'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:2e444e379f31d0b8e09273ec7ffe87a0' WHERE ID = 'changelog-3.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:974c33d2fb399ef6477c3897450fb078' WHERE ID = 'changelog-3.7-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:74d68027951f8d2ae6bb2e24df8365bc' WHERE ID = 'changelog-3.8' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.8'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:34822842d65deb843a7d16f857d52ecc' WHERE ID = 'changelog-3.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.9'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:d59fa93049c031a8bcfbc02958c1942c' WHERE ID = 'changelog-4.0-clean' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1adabae3238e02ccc97cc422359a58a0' WHERE ID = 'changelog-4.0-clean-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:e1ddbe83e1ecf856a912755fc118f82e' WHERE ID = 'changelog-3.10' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:191c21d8f0f921845cf93bbc9d0639b9' WHERE ID = 'changelog-3.10-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ad1f63566e8d08812fbf0b93a118ef6e' WHERE ID = 'changelog-3.10-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:127b36b9d32a9d236df51d19b18c3766' WHERE ID = 'changelog-3.7-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:07 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:7800f890b9706a480bd5a79b591b6ca7' WHERE ID = 'changelog-3.11' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.11'
2020-09-21 08:38:07 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 08:38:07 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 08:38:07 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 08:38:07 INFO: ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL
2020-09-21 08:38:07 ERROR: Change Set changelog-3.12::changelog-3.12::author failed. Error: Duplicate column name 'mailsent' [Failed SQL: (1060) ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL]
2020-09-21 08:38:08 INFO: Successfully released change log lock
2020-09-21 08:38:08 ERROR: Main method error - Duplicate column name 'mailsent' - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:292 < Main:137 < ...)
2020-09-21 08:38:18 INFO: HikariPool-1 - Starting...
2020-09-21 08:38:18 WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-09-21 08:38:18 INFO: HikariPool-1 - Start completed.
2020-09-21 08:38:19 INFO: Clearing database change log checksums
2020-09-21 08:38:19 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:19 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:19 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 08:38:19 INFO: Successfully acquired change log lock
2020-09-21 08:38:19 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 08:38:19 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = NULL
2020-09-21 08:38:19 INFO: Successfully released change log lock
2020-09-21 08:38:19 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:19 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-09-21 08:38:19 INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-09-21 08:38:19 INFO: Successfully acquired change log lock
2020-09-21 08:38:19 INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 08:38:19 INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-09-21 08:38:20 INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-09-21 08:38:20 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 08:38:20 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 08:38:20 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ea6f202534dc7845fd1a49e1d8384d9c' WHERE ID = 'changelog-3.3' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.3'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:194e3ae7ec6d201917136e04a26e237b' WHERE ID = 'changelog-3.5' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.5'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1ec7941b03749f24e365bc6126b07e1a' WHERE ID = 'changelog-3.6' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.6'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:2e444e379f31d0b8e09273ec7ffe87a0' WHERE ID = 'changelog-3.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:974c33d2fb399ef6477c3897450fb078' WHERE ID = 'changelog-3.7-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:74d68027951f8d2ae6bb2e24df8365bc' WHERE ID = 'changelog-3.8' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.8'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:34822842d65deb843a7d16f857d52ecc' WHERE ID = 'changelog-3.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.9'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:d59fa93049c031a8bcfbc02958c1942c' WHERE ID = 'changelog-4.0-clean' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1adabae3238e02ccc97cc422359a58a0' WHERE ID = 'changelog-4.0-clean-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:e1ddbe83e1ecf856a912755fc118f82e' WHERE ID = 'changelog-3.10' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:191c21d8f0f921845cf93bbc9d0639b9' WHERE ID = 'changelog-3.10-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ad1f63566e8d08812fbf0b93a118ef6e' WHERE ID = 'changelog-3.10-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:127b36b9d32a9d236df51d19b18c3766' WHERE ID = 'changelog-3.7-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-09-21 08:38:20 INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:7800f890b9706a480bd5a79b591b6ca7' WHERE ID = 'changelog-3.11' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.11'
2020-09-21 08:38:20 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-09-21 08:38:20 INFO: Reading from traccar.DATABASECHANGELOG
2020-09-21 08:38:20 INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-09-21 08:38:20 INFO: ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL
2020-09-21 08:38:20 ERROR: Change Set changelog-3.12::changelog-3.12::author failed. Error: Duplicate column name 'mailsent' [Failed SQL: (1060) ALTER TABLE traccar.statistics ADD mailsent INT DEFAULT 0 NOT NULL, ADD smssent INT DEFAULT 0 NOT NULL, ADD geocoderrequests INT DEFAULT 0 NOT NULL, ADD geolocationrequests INT DEFAULT 0 NOT NULL]
2020-09-21 08:38:20 INFO: Successfully released change log lock
2020-09-21 08:38:20 ERROR: Main method error - Duplicate column name 'mailsent' - SQLSyntaxErrorException (... < DataManager:312 < *:90 < Context:292 < Main:137 < ...)
2020-09-21 08:38:31 INFO: HikariPool-1 - Starting...
2020-09-21 08:38:31 WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-09-21 08:38:32 INFO: HikariPool-1 - Start completed.
2020-09-21 08:38:32 INFO: Clearing database change log checksums
2020-09-21 08:38:32 INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
I see a bunch of errors. You might have to manually do database migrations.
What do You mean - manually?
Review schema changelog files, apply changes that haven't been applied and fix any issues.
OK, I understand. Thx
Is it possible to make simple upgrade from 3.9 version to newest one?
I have tried it and there is no results :-( Server did not started using database from 3.9 version.
tracker-server.log finishes like this:
and there is no more information in log.