Setup Traccar 4.2 on raspberry

cedric515 years ago

Hello traccar community,
i haven't found a tutorial to setup traccar 4.2 (the only version i want to use with RutG3R homeseer script) on raspberry. Tutorial for v3 exist but it is not the same method...
So for the moment, like it is said at the url https://www.traccar.org/linux/,
i have done a fresh install of raspbian lite and nothing else,
afteri have Run traccar.run (sudo ./traccar.run)
and Start service: with sudo systemctl start traccar.service? Next, I've gone to my browser (Traccar Server IP and port 8082) but it doens't work, i need some help because i'm not familiar with linux/raspbian;
Thank U for your help.

Ernesto Vallejo5 years ago

Does your server log something?

cedric515 years ago

no logs in /opt/traccar/logs, it's like the service is not started...

cedric515 years ago

when i execute the command line : "sudo systemctl status traccar.service", i have :

● traccar.service - traccar
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset:
   Active: failed (Result: exit-code) since Wed 2019-03-13 09:44:23 GMT; 6h ago
  Process: 877 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/
 Main PID: 877 (code=exited, status=203/EXEC)

mar 13 09:44:23 raspberrypi systemd[1]: Started traccar.
mar 13 09:44:23 raspberrypi systemd[1]: traccar.service: Main process exited, co
mar 13 09:44:23 raspberrypi systemd[1]: traccar.service: Unit entered failed sta
mar 13 09:44:23 raspberrypi systemd[1]: traccar.service: Failed with result 'exi
lines 1-10/10 (END)...skipping...
Ernesto Vallejo5 years ago

Well, please double check that whatever instructions in traccar.service file are, they lead to valid executions and paths.

cedric515 years ago

My paths seams good
Ernesto, i have not installed java, could it be that, the problem? i have read somewhere that for tracacr v4 it is not obligatory...

My traccar.service (stored in /etc/systemd/system) :

[Unit]
Description=traccar
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/traccar
ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
SyslogIdentifier=traccar
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
Ernesto Vallejo5 years ago

Check under /var/log/syslog if there's more information about this error.
Probable causes that I can come up with (I'm just wondering):

1- Raspbian is a lightweight version, which means some executables are (could be) missing.
2- SD Card can be causing problems (totally unrelated but could also be an issue)
3- Have you tried to execute ExecStart commands manually? Do they also fail?
4- Are you using root user?
5- Are there any additional errors or warnings at server boot time?
6- Have you setup date and time correctly on server? This can often lead to undesired results.
7- Have you check if there are enough resources for execution?

As I said, I'm just wondering about probable causes here. You might have already check some of this, but if any missing they could not be the real problem, but lead you to find the actual problem and act in consequence.

Hope this helps.

Ernesto Vallejo5 years ago

Check this article
https://freedesktop.org/software/systemd/man/systemd.exec.html#id-1.20.8

Specifically states that exit code 203 refers to:

203	EXIT_EXEC	The actual process execution failed (specifically, the execve(2) system call). Most likely this is caused by a missing or non-accessible executable file.
IoSonoPiero5 years ago

Hello people,
I've installed Traccar on Raspberry 3.
I've downloaded Raspbian, then from this website I've downloaded the ARM Linux zip file on my download folder on Raspberry.
I've run the installer with 'sudo ./traccar.run'
Then I can start manually with 'sudo systemctl start traccar.service' or stop manually with 'sudo systemctl stop traccar.service'

Can this be helpful?

cedric515 years ago

Hello Pierluigi, you were right it the ARM Linux version that i have to use with my raspbian.
Thanks, u and ernesto for your answers .

IoSonoPiero5 years ago

You are welcome! :)