Why do you want to install an old version?
i have an other server windows (PROD) and im trying migration to ubunto server so i can upgrade after
FYI i already try to install v3.14 with an existing database v3,8 but im having exceptions
Can I see the database URL that you are using?
jdbc:mysql://localhost/traccar?allowMultiQueries=true&autoReconnect=true
That's exactly what's causing your problem.
What is the reason for not using officially recommended configuration?
sorry antony , i used the same url in prod im going to change booth of them
thanks so much
when installing new instance it's ok now, but if i use existing database i receive this exception :
INFO|4853/0|Service traccar|17-09-28 07:22:04|INFO 9/28/17 7:22 AM: liquibase: ./schema/changelog-master.xml: changelog-3.7::changelog-3.7::author: Data updated in groups
INFO|4853/0|Service traccar|17-09-28 07:22:04|SEVERE 9/28/17 7:22 AM: liquibase: ./schema/changelog-master.xml: changelog-3.7::changelog-3.7::author: Change Set changelog-3.7::changelog-3.7::author failed. Error: Duplicate column name 'attributes' [Failed SQL: ALTER TABLE trakini.devices ADD attributes VARCHAR(4096) NULL]
INFO|4853/0|Service traccar|17-09-28 07:22:04|INFO 9/28/17 7:22 AM: liquibase: changelog-3.7::changelog-3.7::author: Successfully released change log lock
INFO|4853/0|Service traccar|17-09-28 07:22:04|java.lang.reflect.InvocationTargetException
INFO|4853/0|Service traccar|17-09-28 07:22:04| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at java.lang.reflect.Method.invoke(Method.java:498)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|4853/0|Service traccar|17-09-28 07:22:04|Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.7::changelog-3.7::author:
INFO|4853/0|Service traccar|17-09-28 07:22:04| Reason: liquibase.exception.DatabaseException: Duplicate column name 'attributes' [Failed SQL: ALTER TABLE trakini.devices ADD attributes VARCHAR(4096) NULL]
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.Liquibase.update(Liquibase.java:214)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.Liquibase.update(Liquibase.java:192)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.Liquibase.update(Liquibase.java:188)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:142)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at org.traccar.database.DataManager.<init>(DataManager.java:68)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at org.traccar.Context.init(Context.java:167)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at org.traccar.Main.main(Main.java:35)
INFO|4853/0|Service traccar|17-09-28 07:22:04| ... 6 more
INFO|4853/0|Service traccar|17-09-28 07:22:04|Caused by: liquibase.exception.DatabaseException: Duplicate column name 'attributes' [Failed SQL: ALTER TABLE trakini.devices ADD attributes VARCHAR(4096) NULL]
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1277)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1259)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
INFO|4853/0|Service traccar|17-09-28 07:22:04| ... 15 more
INFO|4853/0|Service traccar|17-09-28 07:22:04|Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'attributes'
INFO|4853/0|Service traccar|17-09-28 07:22:04| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.Util.getInstance(Util.java:408)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
INFO|4853/0|Service traccar|17-09-28 07:22:04| at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:307)
INFO|4853/0|Service traccar|17-09-28 07:22:04| ... 20 more
INFO|wrapper|Service traccar|17-09-28 07:22:05|waitpid 4853 59136
INFO|wrapper|Service traccar|17-09-28 07:22:05|exit code posix process: 59136 application: 0
why changelog detect difference in databases version but its the same
RESOLVED
On Unix, table names are case sensitive. On Windows, they are not. Fun, isn't it?
and traccar have create DATABASECHANGELOG and DATABASECHANGELOGLOCK in capital letter so he duplicate creation in ubunto server and reexecute all scripts
i want to install traccar 3.8 on a ubunto server, i changed the traccar.xml to support mysql database and i create an empty db
traccar.xml :
<properties> <entry key="config.default">./conf/default.xml</entry> <entry key="database.driver">com.mysql.jdbc.Driver</entry> <entry key="database.dataSource">com.mysql.jdbc.jdbc2.optional.MysqlDataSource</entry> <entry key="database.url">jdbc:mysql://localhost/xxxxxx?allowMultiQueries=true&autoReconnect=true</entry> <entry key='database.user'>xxxxx</entry> <entry key='database.password'>xxxxxxx</entry> </properties>
i have this exception when creating database :
PS : i have a database backup for the same version 3.8 but also i have a different exception when i try to excute
help plz
thanks