Traccar 4.3 Server Problem with Raspberry Pi Zero

sava stoyanov6 years ago

Hi guys,
i have some problems starting the traccar service on pi zero running raspbian strech lite.

pi@raspberrypi:~ $ sudo systemctl start traccar.service
pi@raspberrypi:~ $ sudo systemctl status  traccar.service
● traccar.service - traccar
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Mon 2019-03-04 19:35:52 GMT; 6s ago
  Process: 603 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml (code=killed, signal=ILL)
 Main PID: 603 (code=killed, signal=ILL)

Mar 04 19:35:52 raspberrypi systemd[1]: Started traccar.
Mar 04 19:35:52 raspberrypi systemd[1]: traccar.service: Main process exited, code=killed, status=4/ILL
Mar 04 19:35:52 raspberrypi systemd[1]: traccar.service: Unit entered failed state.
Mar 04 19:35:52 raspberrypi systemd[1]: traccar.service: Failed with result 'signal'.

This is what i get.Probably because pi zero is armv6,i do not know.Any suggestions?

Regards Sava

Anton Tananaev6 years ago

My guess is that you don't have enough resources.

sava stoyanov6 years ago

Hi Anton,
i see that some people are running it without problems.
https://www.traccar.org/forums/topic/raspberry-pi-server/#post-27216

Do you think i can play with the java max heap and initial size?:
Starting with version 4.1, YAJSW is no longer used, so you change the java heap size by adding following to the start script:

-Xmx to specify the maximum heap size
-Xms to specify the initial Java heap size
On Linux the start script can be typically found at /etc/systemd/system/traccar.service:

ExecStart=/opt/traccar/jre/bin/java -Xmx1G -jar tracker-server.jar conf/traccar.xml

If i would like to set the both Xmx and Xms can i do this in one line:
ExecStart=/opt/traccar/jre/bin/java -Xmx450MB -Xms400Mb -jar tracker-server.jar conf/traccar.xml
?
Greets Sava

sava stoyanov6 years ago

I have found something very similar to my issue.So it is probably because of the Pi Zero Armv6 architecture, although the issue is with grafana:

I’ve seen this error too. The error is a result of trying to use your ARMv7 binary on ARMv6. All the quad-core Pi’s (2, 3 and 3+) are v7 while the single-core (A, B, and Zero) are v6. Installation works fine since Raspbian is “armhf”, however the binary will get a SIGKILL due to illegal instructions.

Could you please make the binary ARMv6 compatible to allow use on all Raspberry Pi’s? It’s as easy as adding GOARM=6 to your build environment. I believe the performance won’t be affected much (as all of Raspbian, the official Pi OS, is built that way). The former fg2it binaries were built that way too, however he has discontinued updates after official binaries for ARM became available.

Anton Tananaev6 years ago

If you can find ARMv6 OpenJDK distribution, we can integrate it. For now you can just use local Java instead of bundled one.

sava stoyanov6 years ago

Hi Anton,

what do you think about this:
https://www.azul.com/downloads/zulu-embedded/

Greets
Sava

Anton Tananaev6 years ago

Is it compatible with jlink?

sava stoyanov6 years ago
Anton Tananaev6 years ago

You can try to compile installer using this build script:

https://github.com/traccar/traccar/blob/master/setup/package.sh

If everything works well, we can include it.

sava stoyanov6 years ago

Hi Anton,
i have installed the 4.0 version,without doing any changes.And it runs perfectly, using the standart :

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK Client VM (build 25.181-b13, mixed mode)

So my question, what exactly changed in the 4.1 onwards in terms armv6 architecture?Is it only ARMv7 binary and higher supported?

I will look into your suggestion.

Greets Sava

Anton Tananaev6 years ago

We include JRE with installer now. That's the difference.

sava stoyanov6 years ago

Hi Anton,
thx for the feedback.I have downloaded the latest version and started it without the integrated JRE, but with the Azul:

OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)

It works perfectly!
Thank you very much!
Greets Sava

Dean4 years ago

How can I do this. I have

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01)
OpenJDK Client VM (build 25.212-b01, mixed mode)

Installed on my PI Zero, yet still I am getting

Apr 6 09:02:27 raspberrypi systemd[1]: traccar.service: Failed with result 'signal'.

Please help!

Dean4 years ago

I have managed to start the server successfully by coping my java folder to the /opt/traccar/jdk folder and overwriting it.

However, with the server running and after a netstat -an I don't see any active connections in the LISTENING state on 8082.

No errors reported in syslog.

Any ideas?

Thanks

Anton Tananaev4 years ago

Have you checked Traccar logs?