Traccar Server will not start when trying to connect to PostgreSQL DB

Placer a year ago

I have Traccar server setup on a Windows Server 2022 VM. Traccar works with the default DB and I am able to login. When I set the config file to PostgreSQL the service will not start. There is no information in the logs. The config file is located at, "C:\Program Files\Traccar\conf\traccar.xml". The config file is the following,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>

    <!-- Documentation: https://www.traccar.org/configuration-file/ -->

    <entry key='database.driver'>org.postgresql.Driver</entry>
    <entry key='database.url'>jdbc:postgresql://localhost:5432/postgres</entry>
    <entry key='database.user'>postgres</entry>
    <entry key='database.password'>MY PASSWORD</entry>

</properties>

I have created another DB called "Traccar" and assigned the appropriate permissions. I have tried all database URL combinations I can think of for both DB's.

Has anyone seen this, or resolved it?

457478955475 a year ago

what appears in the console? Is your user really Postgres?

Anton Tananaev a year ago

If there's nothing in the logs, it usually indicates a configuration error. Remember that config file has to be a valid XML. If your password has some special characters, make sure to escape those.

Placer a year ago

That's it. Thank you very much Anton