traccar not starting on a fresh installation

Alan Loboa year ago

I have a fresh installation of traccar on a new VM.
I changed the DB parameters as follows.

    <entry key='database.driver'>org.postgresql.Driver</entry>
    <entry key='database.url'>jdbc:postgresql://db-postgresql-xxxz-nnnnn-do-user-nnnnnn-0.db.ondigitalocean.com:25060/traccar?sslmode=require</entry>
    <entry key='database.user'>traccar</entry>
    <entry key='database.password'>xxxx</entry>`

Traccar refuses to start with the following error

ERROR: Main method error - Database is in a locked state. It could be due to early service termination on a previous launch. To unlock you can run this query: 'UPDATE DATABASECHANGELOGLOCK SET locked = 0'. Make sure the schema is up to date before unlocking the database. - DatabaseLockException (DatabaseModule:102 < <gener:-1 < *:-1 < ... < MainModule:128 < ...)
Anton Tananaeva year ago

Have you read the error message before asking for help?

Alan Loboa year ago

yes. I tried looking around for answers.
The thing is that the database is fresh with no tables in it.
The table DATABASECHANGELOGLOCK doesnt exist.
My expectation is that traccar will create the entire database upon starting the service ( since I cannot find any command to manually create the tables )

Anton Tananaeva year ago

If the database is empty, it won't give you think error.

Alan Loboa year ago

maybe this is a postgres bug ? unable to detect an empty database ?

Anton Tananaeva year ago

I very much doubt it. I think the error is exactly what it says it is.

Alan Loboa year ago

I checked the database through a client. The public schema is empty

Alan Loboa year ago

can I create the data tables manually ? or run some sort of script / command to create the tables ?

Anton Tananaeva year ago

Traccar should create everything automatically.

Alan Loboa year ago

after alot of debugging, it turned out that I couldnt see the tables because the database ownership was with another user.
after changing the ownership, i can now see the tables and it is working fine.

unknown5 days ago

what creds did you use to connect on mysql ? Because I am unable to connect with any known user or password

Alan Lobo5 days ago

is your mysql a local instance / installed by you / provided by some provider like amazon etc ?

unknown4 days ago

I used the default install.

On a local VM. didn't build anything my self what ever the installer did.

Thank you in advance

Anton Tananaev4 days ago

Default installation doesn't use MySQL. What makes you think that it does?

unknown4 days ago

well I get the same message ... in the logs ...

eroro 1.png