Traccar server on Raspberry Pi 4

RichardG3 years ago

I would try /usr/bin/java first.

Raoul3 years ago

........and......yessss!!!! Working!!

After a power interrupt of my Raspberry Pi the traccar.service starts automatically.

I saved the original traccar.service file and modified traccar.service file both at another location.

AlfSolli and Richard: thanks a lot!!

Raoul3 years ago

And the traccar status is now also okay:

raoul@Raspberry:~$ systemctl is-active traccar
active
raoul@Raspberry:~$ 
chrise2 years ago

I realise this is an old thread, but i have just been trying to set up 5.13 on a Pi4 and seem to get the same issue, it does not start and run. Does anyone know of a newer set up guide, I too followed the instructables which doesnt work. I should have left the old version running (which worked first time and has been running for four years without issue) and not tried to update it.

Thanks in advance

DougX19a year ago

So today I'm having the same issue as well as Raoul. But this is on an old Raspberry Pi 2 Model B.

So after installing Traccar “sudo systemctl start traccar.service” did not work. So reading this thread I run theses commands:

sudo apt install default-jre
cd /opt/traccar/
sudo java -jar /opt/traccar/tracker-server.jar /opt/traccar/conf/traccar.xml

Traccar is now working. But does not work again after reboot. I need to rerun the command again.

RichardG says “I would try /usr/bin/java first. “
Raoul says”........and......yessss!!!! Working!! “

So I'm not a linux expert, what did Raoul do to get it working?

Anton Tananaeva year ago

Change java in /etc/systemd/system/traccar.service.

Raoula year ago

Hi DougX19,
Sorry I cannot help you but I see that you are in good hands with Anton. He helped me also a lot some 2 years ago!
Since then my Raspberry Pi is up and running without any downtime. It is a great pleasure to use it for GPS purposes almost every day for my car and my mobile home.
Two years ago the installation time took me some two months as I did not know anything about Raspberry, about Linux and about Traccar. During that time I faced so many problems that I left the system untouched as of the moment that it worked well.
I even don't dare now to install the latest version of Traccar as I am afraid that this will take a lot of time to get it up and running again.
I hope you will succeed shortly in getting your system running well!!

chrisea year ago

Hi Anton

Like a number of other people who want to run your excellent Traccar server program I have more experience on mechanical and electriclal engineering and find some programming quite daunting. My first pi2 based server ran without any intervention for several years, it was only when I tried an update (as the pi had some issues) that things went wroing somewhere.
I would extremely grateful if you illuminate us alittle more and show the steps required to accomplish your post of 12 days ago.

DougX19a year ago

Hi chrise,

I tried Anton “Change java in /etc/systemd/system/traccar.service.” but it broke it. I tried to undo what I changed but still broken. Then I started over again using the Raspberry Pi Imager, but this time I picked Raspberry Pi OS (other) with no GUI and it worked, but I've not fully set the system up, as I've no had time to play with it more. Hope that helps you out.

chrisea year ago

Hi Doug
which method did you use? The one on here to automatically install?
thankschris

DougX19a year ago

Hi chrise,

From Memory I use Raspberry Pi Imager to make SD card using settings “Raspberry Pi OS (other)” then “Raspberry Pi OS Lite (32-bit)”

Then followed theses instructions to install traccar
https://www.instructables.com/Introduction-Turn-a-Raspberry-Pi-Into-a-GPS-Tracki/

chrisea year ago

Hi Doug
for clarity are you running a Pi 4? Bullseye or buster?
I have tried again three times and its not working, there must be a step I am failing to make

Thanks in advance for any help you can provide

DougX19a year ago

Hi chrise,

No. I'm running an old Pi 2 Model B.

spoortracka year ago

The change that Anton suggested is as follows (replace the similar line in /etc/systemd/system/traccar.service)

ExecStart=/usr/bin/java -jar tracker-server.jar conf/traccar.xml

Ran into the same problem using an AWS EC2 t4g instance which is ARM64 architecture. After installing java11, I had to change the line as above to make it work.

chrisea year ago

spoortrack
thanks I'll give it a go
chris