Upgrading problem 4.0 -> 4.1

HJvD6 years ago

On my Pi3 I upgraded with the Linux ARM version. After that I did put back the (backed up from 4.0) traccar.xml file in the conf-map and the two db files in the data-map. I think there is a database issue, because I can login with admin/admin, but not with the credentials that are connected to the backed up database. These are the lines in my xml-file:

    <entry key="config.default">./conf/default.xml</entry>
    <entry key='event.geofenceHandler'>true</entry>
    <entry key='filter.enable'>true</entry>    
    <entry key='filter.invalid'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'></entry>
HJvD6 years ago
2018-10-21 13:00:07  INFO: HikariPool-1 - Starting...
2018-10-21 13:00:10  INFO: HikariPool-1 - Start completed.
2018-10-21 13:00:15  INFO: Clearing database change log checksums
2018-10-21 13:00:15  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
2018-10-21 13:00:16  INFO: CREATE TABLE PUBLIC.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))
2018-10-21 13:00:16  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
2018-10-21 13:00:16  INFO: DELETE FROM PUBLIC.DATABASECHANGELOGLOCK
2018-10-21 13:00:16  INFO: INSERT INTO PUBLIC.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, FALSE)
2018-10-21 13:00:16  INFO: SELECT LOCKED FROM PUBLIC.DATABASECHANGELOGLOCK WHERE ID=1
2018-10-21 13:00:16  INFO: Successfully acquired change log lock
2018-10-21 13:00:16  INFO: Creating database history table with name: PUBLIC.DATABASECHANGELOG
2018-10-21 13:00:17  INFO: CREATE TABLE PUBLIC.DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10))
2018-10-21 13:00:17  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
2018-10-21 13:00:17  INFO: UPDATE PUBLIC.DATABASECHANGELOG SET MD5SUM = NULL
2018-10-21 13:00:17  INFO: Successfully released change log lock
2018-10-21 13:00:17  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
2018-10-21 13:00:17  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
2018-10-21 13:00:17  INFO: SELECT LOCKED FROM PUBLIC.DATABASECHANGELOGLOCK WHERE ID=1
2018-10-21 13:00:17  INFO: Successfully acquired change log lock
2018-10-21 13:00:52  INFO: SELECT MD5SUM FROM PUBLIC.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL
2018-10-21 13:00:52  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOG
2018-10-21 13:00:52  INFO: Reading from PUBLIC.DATABASECHANGELOG
2018-10-21 13:00:52  INFO: SELECT * FROM PUBLIC.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2018-10-21 13:00:57  INFO: CREATE TABLE PUBLIC.tc_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_TC_ATTRIBUTES PRIMARY KEY (id))
2018-10-21 13:00:57  INFO: Table tc_attributes created
2018-10-21 13:00:57  INFO: CREATE TABLE PUBLIC.tc_calendars (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(128) NOT NULL, data BLOB NOT NULL, attributes VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_CALENDARS PRIMARY KEY (id))
2018-10-21 13:00:57  INFO: Table tc_calendars created
2018-10-21 13:00:57  INFO: CREATE TABLE PUBLIC.tc_commands (id INT AUTO_INCREMENT NOT NULL, description VARCHAR(4000) NOT NULL, type VARCHAR(128) NOT NULL, textchannel BOOLEAN DEFAULT FALSE NOT NULL, attributes VARCHAR(4000) NOT NULL, CONSTRAINT PK_TC_COMMANDS PRIMARY KEY (id))
2018-10-21 13:00:57  INFO: Table tc_commands created
2018-10-21 13:00:57  INFO: CREATE TABLE PUBLIC.tc_device_attribute (deviceid INT NOT NULL, attributeid INT NOT NULL)
2018-10-21 13:00:57  INFO: Table tc_device_attribute created
...
2018-10-21 13:18:45  WARN: Unknown device - 489497 (127.0.0.1)
2018-10-21 13:18:45  INFO: [c6506afc: 5055 > 127.0.0.1] HEX: 485454502f312e31203430302042616420526571756573740d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-10-21 13:19:15  INFO: [c6506afc] disconnected
2018-10-21 13:29:07  INFO: [8b804124] connected
2018-10-21 13:29:07  INFO: [8b804124: 5055 < 127.0.0.1] HEX: 504f5354202f3f69643d3438393439372674696d657374616d703d31353430313137363134266c61743d35322e35353136323233266c6f6e3d352e383838353333362673706565643d302e302662656172696e673d302e3026616c7469747564653d33392e3430303030313532353837383930362661636375726163793d32312e303133303030343838323831323526626174743d32322e3020485454502f312e310d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420393b2047542d4939313935204275696c642f505052322e3138303930352e303035290d0a4163636570742d456e636f64696e673a20677a69700d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a5669613a20687474702f312e312072617370626572727970690d0a582d466f727761726465642d466f723a203139322e3136382e312e310d0a582d466f727761726465642d50726f746f3a20687474700d0a582d466f727761726465642d486f73743a2039342e3231352e3137322e35303a383038320d0a582d466f727761726465642d5365727665723a203139322e3136382e312e31320d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2018-10-21 13:29:07  WARN: Unknown device - 489497 (127.0.0.1)
2018-10-21 13:29:07  INFO: [8b804124: 5055 > 127.0.0.1] HEX: 485454502f312e31203430302042616420526571756573740d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2018-10-21 13:29:37  INFO: [8b804124] disconnected
Anton Tananaev6 years ago

Have you restored your original database?

HJvD6 years ago

Yes I restored the database I used in 4.0.

Anton Tananaev6 years ago

Your log indicates that database was empty when you started server.

HJvD6 years ago

OK. I'll try and shut down the server, clear the db and log, put back the backed up database and then restart the server.

HJvD6 years ago

Not sure what did the trick, but after putting back the db for backup 4.0 and give both files 777 rights, Traccar 4.1 is running fine now. Many thanks Anton for your work.