database corrupted in wrapper log

ramos9 years ago

I get the following error when starting traccar server as service on Windows 7.
The error code in Windows log is error 1.

STATUS | wrapper  | 2016/04/25 15:35:51 | --> Wrapper Started as Service
STATUS | wrapper  | 2016/04/25 15:35:51 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/04/25 15:35:51 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/04/25 15:35:51 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/04/25 15:35:51 | 
STATUS | wrapper  | 2016/04/25 15:35:52 | Launching a JVM...
INFO   | jvm 1    | 2016/04/25 15:35:52 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/04/25 15:35:53 | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
INFO   | jvm 1    | 2016/04/25 15:35:53 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp: 
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLException: IO Exception: null [90028-191]
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:247)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:151)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:140)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:157)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.traccar.database.DataManager.<init>(DataManager.java:65)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.traccar.Context.init(Context.java:121)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.traccar.Main.main(Main.java:29)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at java.lang.reflect.Method.invoke(Unknown Source)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: null [90028-191]
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.message.DbException.get(DbException.java:168)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:191)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:167)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:99)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Database.getPageStore(Database.java:2460)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Database.open(Database.java:692)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Database.openDatabase(Database.java:270)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Database.<init>(Database.java:264)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Engine.openSession(Engine.java:65)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Engine.openSession(Engine.java:175)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Engine.createSessionAndValidate(Engine.java:153)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Engine.createSession(Engine.java:136)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.Engine.createSession(Engine.java:28)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.Driver.connect(Driver.java:72)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:239)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	... 12 more
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: Caused by: java.lang.IllegalStateException: Reading from cache:nio:C:/Program Files (x86)/Traccar/data/database.mv.db failed; file length 1118208 read length 1024 at 1206298 [1.4.191/1]
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.DataUtils.readFully(DataUtils.java:443)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.FileStore.readFully(FileStore.java:98)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.Page.read(Page.java:190)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.readPage(MVStore.java:1939)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.Page.getChildPage(Page.java:217)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVMap.binarySearch(MVMap.java:468)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVMap.get(MVMap.java:450)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.getChunkIfFound(MVStore.java:954)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.getChunk(MVStore.java:931)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.readPage(MVStore.java:1930)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.Page.getChildPage(Page.java:217)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.Cursor.min(Cursor.java:129)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.Cursor.hasNext(Cursor.java:36)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.loadChunkMeta(MVStore.java:689)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:670)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore.<init>(MVStore.java:353)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2888)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:154)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	... 27 more
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: Caused by: java.io.EOFException
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	at org.h2.mvstore.DataUtils.readFully(DataUtils.java:431)
INFO   | jvm 1    | 2016/04/25 15:35:54 | WrapperSimpleApp Error: 	... 46 more
STATUS | wrapper  | 2016/04/25 15:35:56 | <-- Wrapper Stopped
Anton Tananaev9 years ago

Looks like H2 database file is corrupted. If you don't have any valuable data there, you can just remove the file to fix the problem. If you have some valuable data, you can try some H2 tools to recover data, but you definitely shouldn't rely on H2 if you care about stored data. You should use proper database like MySQL.