(code=ex1ted, status=1/FAILURE) traccar

Diego2 months ago

Hi, everyone
I have this problem in my Traccar Server, after rebooting the system I had this issue.

root@Server-3:/opt/traccar# /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
Exception in thread "main" java.lang.RuntimeException: liquibase.exception.LockException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLNonTransientException: General error: "General error: ""java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"" [50000-200]"; SQL statement:
ROLLBACK [50000-200]
        at org.traccar.Main.run(Main.java:147)
        at org.traccar.Main.main(Main.java:106)
Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLNonTransientException: General error: "General error: ""java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"" [50000-200]"; SQL statement:
ROLLBACK [50000-200]
        at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:293)
        at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:211)
        at liquibase.Liquibase$19.run(Liquibase.java:2162)
        at liquibase.Scope.lambda$child$0(Scope.java:166)
        at liquibase.Scope.child(Scope.java:175)
        at liquibase.Scope.child(Scope.java:165)
        at liquibase.Scope.child(Scope.java:144)
        at liquibase.Liquibase.runInScope(Liquibase.java:2404)
        at liquibase.Liquibase.clearCheckSums(Liquibase.java:2157)
        at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:295)
        at org.traccar.database.DataManager.<init>(DataManager.java:90)
        at org.traccar.Context.init(Context.java:290)
        at org.traccar.Main.run(Main.java:120)
        ... 1 more
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLNonTransientException: General error: "General error: ""java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"" [50000-200]"; SQL statement:
ROLLBACK [50000-200]
        at liquibase.database.AbstractJdbcDatabase.rollback(AbstractJdbcDatabase.java:1166)
        at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:249)
        ... 13 more
Caused by: liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLNonTransientException: General error: "General error: ""java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"" [50000-200]"; SQL statement:
ROLLBACK [50000-200]
        at liquibase.database.jvm.JdbcConnection.rollback(JdbcConnection.java:408)
        at liquibase.database.AbstractJdbcDatabase.rollback(AbstractJdbcDatabase.java:1164)
        ... 14 more
Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "General error: ""java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"" [50000-200]"; SQL statement:
ROLLBACK [50000-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:505)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
        at org.h2.message.DbException.get(DbException.java:194)
        at org.h2.engine.Database.throwLastBackgroundException(Database.java:2221)
        at org.h2.engine.Database.commit(Database.java:2202)
        at org.h2.engine.Session.rollback(Session.java:846)
        at org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:49)
        at org.h2.command.CommandContainer.update(CommandContainer.java:198)
        at org.h2.command.Command.executeUpdate(Command.java:251)
        at org.h2.jdbc.JdbcConnection.rollbackInternal(JdbcConnection.java:1530)
        at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:561)
        at liquibase.database.jvm.JdbcConnection.rollback(JdbcConnection.java:405)
        ... 15 more
Caused by: org.h2.message.DbException: General error: "java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0" [50000-200]
        at org.h2.message.DbException.get(DbException.java:194)
        at org.h2.message.DbException.convert(DbException.java:347)
        at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93)
        at org.h2.mvstore.MVStore.handleException(MVStore.java:2877)
        at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2813)
        at org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:3290)
Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0" [50000-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:505)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
        ... 6 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at org.h2.mvstore.Page.getKey(Page.java:270)
        at org.h2.mvstore.MVMap.rewritePage(MVMap.java:773)
        at org.h2.mvstore.MVMap.rewrite(MVMap.java:734)
        at org.h2.mvstore.MVMap.rewrite(MVMap.java:710)
        at org.h2.mvstore.MVStore.compactRewrite(MVStore.java:2137)
        at org.h2.mvstore.MVStore.rewriteChunks(MVStore.java:2026)
        at org.h2.mvstore.MVStore.doMaintenance(MVStore.java:2844)
        at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2788)
        ... 1 more
Anton Tananaev2 months ago

My guess is the database is corrupted. I keep repeating over and over again that people shouldn't use the default H2 database for anything other than testing. You should install and configure MySQL or some other proper database system.