Device media path not automatically created

Don6 months ago

Hi,

I have created 2 JT808 based dashcam, and have created media folder manually, but why the device's media path not automatically created?

traccar.xml

<entry key='media.path'>/opt/traccar/data/media</entry>

what I missed?

Richard Acosta6 months ago

Disk permissions on your server.

Donald P6 months ago

@Richard,

It owned by root with 777

Mike10 days ago

In my case, after modify the traccar.xml I set a custom service in /etc/systemd/system/traccar-custom.service with this info:

[Unit]
Description=Traccar GPS Tracking Server
After=network.target mysql.service postgresql.service

[Service]
Type=simple
WorkingDirectory=/var/www/traccar
ExecStart=/usr/bin/java -jar /var/www/traccar/target/tracker-server.jar -config /var/www/traccar/setup/traccar.xml
User=root
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Then restart the traccar service

sudo systemctl restart traccar-custom.service

and check the status

sudo systemctl status traccar-custom.service
# or
sudo tail -f /var/www/traccar/logs/tracker-server.log
Anton Tananaev10 days ago

That's not the correct way of providing the config file. Where did you find this format?

Mike10 days ago

That is the way that work for me. I'm using a Traccar Droplet from DigitalOcean (with nginx), and the service is based in the idea from https://github.com/traccar/traccar/blob/master/setup/traccar.service

If this is not an optimal way, what it is?

Anton Tananaev10 days ago

It has nothing to with optimal or non optimal. It's simply invalid. You have non-existent -config parameter there. Where did you get it from? It doesn't exist in the file you're referencing from our GitHub.

Mike10 days ago

You are right. I don't know why it was working (with the flag). I have removed the -config, restart the service and check for errors, but everything is ok again (as always).

- ExecStart=/usr/bin/java -jar /var/www/traccar/target/tracker-server.jar -config /var/www/traccar/setup/traccar.xml
+ ExecStart=/usr/bin/java -jar /var/www/traccar/target/tracker-server.jar /var/www/traccar/setup/traccar.xml

I think that Claude 3.7 Sonnet Thinking has some bad info (or it was not trainned well), hehehe