ERROR SQL en traccar 4.2

simplementese6 years ago

Good morning and thank you very much.

Install the traccar server and it works well with the h2 database.

I install Mysql 5.7 I think the database, and apparently it connects, but it gives error in the creation of tables, I attach the records.

Sorry, I do not know what the syntax is like to show everything in a box

2018-12-19 14:03:19  INFO: HikariPool-1 - Starting...
2018-12-19 14:03:20  INFO: HikariPool-1 - Start completed.
2018-12-19 14:03:21  INFO: Clearing database change log checksums
2018-12-19 14:03:22  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
...
2018-12-19 14:03:29 INFO: INSERT INTO PUBLIC.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-4.0-renaming', 'author', 'changelog-4.0', NOW(), 27, '8:90aedfa378aa717f8d8ae541f97b87b2', 'renameTable newTableName=tc_attributes, oldTableName=attributes; renameTable newTableName=tc_calendars, oldTableName=calendars; renameTable newTableName=tc_commands, oldTableName=commands; renameTable newTableName=tc_device_attribute, oldTableName...', '', 'MARK_RAN', NULL, NULL, '3.6.2', '5239007100')
2018-12-19 14:03:29 INFO: Marking ChangeSet: changelog-4.1::changelog-4.1-mssql::author ran despite precondition failure due to onFail='MARK_RAN':
./schema/changelog-master.xml : DBMS Precondition failed: expected mssql, got h2

2018-12-19 14:03:29 INFO: INSERT INTO PUBLIC.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('changelog-4.1-mssql', 'author', 'changelog-4.1', NOW(), 28, '8:b148f52efe9c6a3e74a56e33e257a3e2', 'sql; sql; sql; sql', '', 'MARK_RAN', NULL, NULL, '3.6.2', '5239007100')
2018-12-19 14:03:29  INFO: Successfully released change log lock
2018-12-19 14:03:29  INFO: Logging initialized @11325ms to org.eclipse.jetty.util.log.Slf4jLog
2018-12-19 14:03:30  INFO: Operating system name: Windows Server 2008 R2 version: 6.1 architecture: amd64
2018-12-19 14:03:30  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 10.0.2.1-ojdkbuild+13
2018-12-19 14:03:30  INFO: Memory limit heap: 989mb non-heap: 0mb
2018-12-19 14:03:30  INFO: Character encoding: Cp1252 charset: windows-1252
2018-12-19 14:03:30  INFO: Version: 4.2-SNAPSHOT
2018-12-19 14:03:30  INFO: Starting server...
2018-12-19 14:03:31  INFO: jetty-9.4.12.v20180830; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 10.0.2.1-ojdkbuild+13
2018-12-19 14:03:31  INFO: Started o.t.w.@4bf55338{/,null,AVAILABLE}
2018-12-19 14:03:31  INFO: DefaultSessionIdManager workerName=node0
2018-12-19 14:03:31  INFO: No SessionScavenger set, using defaults
2018-12-19 14:03:31  INFO: node0 Scavenging every 600000ms
2018-12-19 14:03:33  INFO: Started o.e.j.s.ServletContextHandler@45bd7cd8{/,null,AVAILABLE}
2018-12-19 14:03:33  INFO: Started ServerConnector@552d1540{HTTP/1.1,[http/1.1]}{0.0.0.0:8082}
2018-12-19 14:03:33  INFO: Started @15096ms
Anton Tananaev6 years ago

There are no errors. Everything is working as expected.

simplementese6 years ago

when entering localhost: 8082, it remains in a "loading" state, it does not reach the logeo table.

and when entering the sql, I see that I do not create any table

Anton Tananaev6 years ago

Well, according to the log, everything is working. If you don't see table, it probably means that Traccar connects to some different database. As for web app, you need to check browser console for errors.

simplementese6 years ago

my cfg

<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/base1?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''
</entry>
<entry key='database.user'>root</entry>
<entry key='database.password'>************</entry>
simplementese6 years ago

Good is a new installation, with the sql server on the same machine and the only database created .. with the H2 database works correctly ..

CONSOLE ERROR

simplementese6 years ago
2018-12-19 14:03:19  INFO: HikariPool-1 - Starting...
2018-12-19 14:03:20  INFO: HikariPool-1 - Start completed.
2018-12-19 14:03:21  INFO: Clearing database change log checksums
...
2018-12-19 14:03:28  INFO: Foreign key constraint added to tc_user_notification (userid)
2018-12-19 14:03:28  INFO: ALTER TABLE PUBLIC.tc_user_user ADD CONSTRAINT fk_user_user_userid FOREIGN KEY (userid) REFERENCES PUBLIC.tc_users (id) ON DELETE CASCADE
2018-12-19 14:03:28  INFO: Foreign key constraint added to tc_user_user (userid)
2018-12-19 14:03:28  INFO: INSERT INTO PUBLIC.tc_servers (registration, latitude, longitude, zoom) VALUES (TRUE, 0, 0, 0)
2018-12-19 14:03:28  INFO: New row inserted into tc_servers
simplementese6 years ago

Download to test the connection to the database and connect everything ok.

By how the log starts traccar connects to the database can be? Can not create the tables or block them?

TEST OK/a>

Anton Tananaev6 years ago

I don't understand your questions. As far as I can tell from your log, everything is working correctly.

simplementese6 years ago

Can these errors be the reason? sorry but I have been fighting with the mysql for days

logs error

Anton Tananaev6 years ago

Those are not errors. That's expected output.

simplementese6 years ago

As everything is OK, but you can not create the tables in base1, in the only base to which you connect. and the test that connects well.

Console error, that is the browser sample when trying to access the web