Traccar 4.0 Service Crashing Automatically

mohit agarwal6 years ago

I have been using Traccar 4.0 for past 2 months but no issues.(BTW i am using MS SQL 2014 and Traccar 4.0)
Strangely from today morning, i am facing below issue in my log and my services get crashed automatically.
Please help as i am not able to find any solution since then.

Attached log of wrapper log file:-

INFO|wrapper|Service traccar|19-03-14 20:48:03|start delay: 0
INFO|wrapper|Service traccar|19-03-14 20:48:04|started process with pid 12064
...
INFO|12064/0|Service traccar|19-03-14 20:48:08|[main] INFO liquibase.executor.jvm.JdbcExecutor - select schema_name()
INFO|12064/0|Service traccar|19-03-14 20:48:08|[main] INFO liquibase.executor.jvm.JdbcExecutor - CREATE TABLE users (id int IDENTITY (1, 1) NOT NULL, name varchar(128) NOT NULL, email varchar(128) NOT NULL, hashedpassword varchar(128) NOT NULL, salt varchar(128) NOT NULL, readonly bit CONSTRAINT DF_users_readonly DEFAULT 0 NOT NULL, administrator bit CONSTRAINT DF_users_administrator DEFAULT 0 NOT NULL, map varchar(128) CONSTRAINT DF_users_map DEFAULT 'osm' NOT NULL, language varchar(128) CONSTRAINT DF_users_language DEFAULT 'en' NOT NULL, distanceunit varchar(128) CONSTRAINT DF_users_distanceunit DEFAULT 'km' NOT NULL, speedunit varchar(128) CONSTRAINT DF_users_speedunit DEFAULT 'kmh' NOT NULL, latitude float(53) CONSTRAINT DF_users_latitude DEFAULT 0 NOT NULL, longitude float(53) CONSTRAINT DF_users_longitude DEFAULT 0 NOT NULL, zoom int CONSTRAINT DF_users_zoom DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))
INFO|12064/0|Service traccar|19-03-14 20:48:08|[main] ERROR liquibase.changelog.ChangeSet - Change Set changelog-3.3::changelog-3.3::author failed.  Error: There is already an object named 'PK_USERS' in the database. [Failed SQL: CREATE TABLE users (id int IDENTITY (1, 1) NOT NULL, name varchar(128) NOT NULL, email varchar(128) NOT NULL, hashedpassword varchar(128) NOT NULL, salt varchar(128) NOT NULL, readonly bit CONSTRAINT DF_users_readonly DEFAULT 0 NOT NULL, administrator bit CONSTRAINT DF_users_administrator DEFAULT 0 NOT NULL, map varchar(128) CONSTRAINT DF_users_map DEFAULT 'osm' NOT NULL, language varchar(128) CONSTRAINT DF_users_language DEFAULT 'en' NOT NULL, distanceunit varchar(128) CONSTRAINT DF_users_distanceunit DEFAULT 'km' NOT NULL, speedunit varchar(128) CONSTRAINT DF_users_speedunit DEFAULT 'kmh' NOT NULL, latitude float(53) CONSTRAINT DF_users_latitude DEFAULT 0 NOT NULL, longitude float(53) CONSTRAINT DF_users_longitude DEFAULT 0 NOT NULL, zoom int CONSTRAINT DF_users_zoom DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]
INFO|12064/0|Service traccar|19-03-14 20:48:08|[main] INFO liquibase.executor.jvm.JdbcExecutor - select schema_name()
INFO|12064/0|Service traccar|19-03-14 20:48:08|[main] INFO liquibase.lockservice.StandardLockService - Successfully released change log lock
INFO|12064/0|Service traccar|19-03-14 20:48:08|java.lang.reflect.InvocationTargetException
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at java.lang.reflect.Method.invoke(Unknown Source)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|12064/0|Service traccar|19-03-14 20:48:08|Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set changelog-3.3::changelog-3.3::author:
INFO|12064/0|Service traccar|19-03-14 20:48:08|     Reason: liquibase.exception.DatabaseException: There is already an object named 'PK_USERS' in the database. [Failed SQL: CREATE TABLE users (id int IDENTITY (1, 1) NOT NULL, name varchar(128) NOT NULL, email varchar(128) NOT NULL, hashedpassword varchar(128) NOT NULL, salt varchar(128) NOT NULL, readonly bit CONSTRAINT DF_users_readonly DEFAULT 0 NOT NULL, administrator bit CONSTRAINT DF_users_administrator DEFAULT 0 NOT NULL, map varchar(128) CONSTRAINT DF_users_map DEFAULT 'osm' NOT NULL, language varchar(128) CONSTRAINT DF_users_language DEFAULT 'en' NOT NULL, distanceunit varchar(128) CONSTRAINT DF_users_distanceunit DEFAULT 'km' NOT NULL, speedunit varchar(128) CONSTRAINT DF_users_speedunit DEFAULT 'kmh' NOT NULL, latitude float(53) CONSTRAINT DF_users_latitude DEFAULT 0 NOT NULL, longitude float(53) CONSTRAINT DF_users_longitude DEFAULT 0 NOT NULL, zoom int CONSTRAINT DF_users_zoom DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.Liquibase.update(Liquibase.java:202)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.Liquibase.update(Liquibase.java:179)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.Liquibase.update(Liquibase.java:175)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:307)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at org.traccar.database.DataManager.<init>(DataManager.java:88)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at org.traccar.Context.init(Context.java:361)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at org.traccar.Main.main(Main.java:35)
INFO|12064/0|Service traccar|19-03-14 20:48:08|	... 6 more
INFO|12064/0|Service traccar|19-03-14 20:48:08|Caused by: liquibase.exception.DatabaseException: There is already an object named 'PK_USERS' in the database. [Failed SQL: CREATE TABLE users (id int IDENTITY (1, 1) NOT NULL, name varchar(128) NOT NULL, email varchar(128) NOT NULL, hashedpassword varchar(128) NOT NULL, salt varchar(128) NOT NULL, readonly bit CONSTRAINT DF_users_readonly DEFAULT 0 NOT NULL, administrator bit CONSTRAINT DF_users_administrator DEFAULT 0 NOT NULL, map varchar(128) CONSTRAINT DF_users_map DEFAULT 'osm' NOT NULL, language varchar(128) CONSTRAINT DF_users_language DEFAULT 'en' NOT NULL, distanceunit varchar(128) CONSTRAINT DF_users_distanceunit DEFAULT 'km' NOT NULL, speedunit varchar(128) CONSTRAINT DF_users_speedunit DEFAULT 'kmh' NOT NULL, latitude float(53) CONSTRAINT DF_users_latitude DEFAULT 0 NOT NULL, longitude float(53) CONSTRAINT DF_users_longitude DEFAULT 0 NOT NULL, zoom int CONSTRAINT DF_users_zoom DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]
INFO|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	... 15 more
FINEST|12064/0|Service traccar|19-03-14 20:48:08|Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'PK_USERS' in the database.
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:259)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1547)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:857)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:757)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7347)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2713)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:224)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:204)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:734)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
FINEST|12064/0|Service traccar|19-03-14 20:48:08|	... 20 more
INFO|wrapper|Service traccar|19-03-14 20:48:09|calling onStop
INFO|wrapper|Service traccar|19-03-14 20:48:09|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|19-03-14 20:48:09|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|19-03-14 20:48:09|Win service stop - after shutdown
INFO|wrapper|Service traccar|19-03-14 20:48:09|Win service stop - before notify
INFO|wrapper|Service traccar|19-03-14 20:48:09|Win service terminated
Ernesto Vallejo6 years ago

Did you customize something?
Have you read this article?

If you share some more info that could help us get guidance to proper problem.

mohit agarwal6 years ago

No Customization done.
The system was working fine from past more than 2 months.
It stopped working without any known reason.
The following error is right now coming in wrapper log file:-

''Caused by: liquibase.exception.DatabaseException: There is already an object named 'PK_USERS' in the database. 
[Failed SQL: CREATE TABLE users (id int IDENTITY (1, 1) NOT NULL, name varchar(128) NOT NULL, email varchar(128) NOT NULL, hashedpassword varchar(128) NOT NULL, salt varchar(128) NOT NULL, readonly bit CONSTRAINT DF_users_readonly DEFAULT 0 NOT NULL, administrator bit CONSTRAINT DF_users_administrator DEFAULT 0 NOT NULL, map varchar(128) CONSTRAINT DF_users_map DEFAULT 'osm' NOT NULL, language varchar(128) CONSTRAINT DF_users_language DEFAULT 'en' NOT NULL, distanceunit varchar(128) CONSTRAINT DF_users_distanceunit DEFAULT 'km' NOT NULL, speedunit varchar(128) CONSTRAINT DF_users_speedunit DEFAULT 'kmh' NOT NULL, latitude float(53) CONSTRAINT DF_users_latitude DEFAULT 0 NOT NULL, longitude float(53) CONSTRAINT DF_users_longitude DEFAULT 0 NOT NULL, zoom int CONSTRAINT DF_users_zoom DEFAULT 0 NOT NULL, CONSTRAINT PK_USERS PRIMARY KEY (id))]''