Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traccar on raspberry pi #106

Closed
tamarko opened this issue Dec 9, 2012 · 20 comments
Closed

traccar on raspberry pi #106

tamarko opened this issue Dec 9, 2012 · 20 comments

Comments

@tamarko
Copy link

tamarko commented Dec 9, 2012

Hi,

Trying to run traccar on a raspberry pi (32 bit ARM processor). JRE is installed OK (openJDK). 32 bit traccar installation is used.

However upon entering the following command:

pi@raspbmc:~$ sudo /opt/traccar/bin/traccar start

Response is:

Starting traccar...
 /opt/traccar/bin/./wrapper: 1: /opt/traccar/bin/./wrapper: Syntax error: "(" unexpected
Waiting for traccar..................
WARNING: traccar may have failed to start.

JRE is installed OK - using openJDK. installed java using: apt-get install openjdk-6-jre libjna-java

pi@raspbmc:~$ java -version
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1+rpi1)
OpenJDK Zero VM (build 22.0-b10, mixed mode)

Any ideas?

Tim

@tamarko
Copy link
Author

tamarko commented Dec 9, 2012

OK, so by following the treatment described in issue #89 - "Wrapper problems", I think I have enabled the server to run .

pi@raspbmc:/opt/traccar$ sudo java -jar tracker-server.jar /opt/traccar/conf/linux.cfg
Dec 09, 2012 1:08:20 AM org.traccar.Main main
INFO: starting server...
2012-12-09 01:08:20.964:INFO:oejs.Server:jetty-8.1.7.v20120910
2012-12-09 01:08:21.685:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8082

But the database appears empty when browsing to the device on through the web interface. Also there is no data in the logfile:

pi@raspbmc:~$ cat /opt/traccar/logs/tracker-server.log
2012-12-09 01:08:20 INFO: starting server...
2012-12-09 01:51:02 INFO: shutting down server...
2012-12-10 12:36:18 INFO: starting server...
pi@raspbmc:~$

I know that the gps unit is configured correctly becuase netcat gives the following:

pi@raspbmc:~$ nc -l 0.0.0.0 5020
 $$A141,012896005334567,AAA,35,-33.866543,151.190148,121209081758,A,6,27,0,16,1,48,65551,152784,505|2|0B5F|D9D3,0000,0000|0000|0000|0A39|0000,,*5B
 $$B141,012896005334567,AAA,35,-33.866543,151.190148,121209081929,A,6,25,0,16,1,48,65551,152873,505|2|0B5F|D9D3,0000,0000|0000|0000|0A3B|0000,,*62

Do I have some permission problems or something? I ask about permission problems because running the command above as the local user crashes out with permission erorrs.

Any ideas how I might get the service running and how to ensure that data is collected by the service? I still receive the errors identified on my first post when trying th start the service eg:

pi@raspbmc:~$ service traccar console
Running traccar...
/opt/traccar/bin/./wrapper: 1: /opt/traccar/bin/./wrapper: Syntax error: "(" unexpected
pi@raspbmc:~$ sudo service traccar console
Running traccar...
/opt/traccar/bin/./wrapper: 1: /opt/traccar/bin/./wrapper: Syntax error: "(" unexpected
pi@raspbmc:~$

@tananaev
Copy link
Member

tananaev commented Dec 9, 2012

Well, first of all, 32 bit edition won't work as linux daemon, because it is for x86 processor... you still can run it manually.

Permissions problem is because it is installed in /opt directory, which has write permissions only for root user, so application is probably trying to create log file and failing because regular user can't create files there... you can try to set write permission for your user on /opt/traccar recursively.

I'll make ARM installer for you to try...

@tananaev
Copy link
Member

tananaev commented Dec 9, 2012

Here is a build for armhf architecture - https://docs.google.com/open?id=0B2GwK26geA9eckp6c205eFQzdlU

Please let me if it works fine...

@tamarko
Copy link
Author

tamarko commented Dec 9, 2012

Thank you for such a fast build... but no luck :(

removed per the readme.txt as instructed... then installed using the new install package per sudo sh ./traccar.run

Segmentation fault now...

pi@raspbmc:~$ sudo /opt/traccar/bin/traccar start
/opt/traccar/bin/traccar: 1: /opt/traccar/bin/traccar: readelf: not found
Starting traccar...
Segmentation fault
Waiting for traccar..................
WARNING: traccar may have failed to start.

Can start the front end manually again per the second post, but am not collecting data in the log file or database

Any other ideas? Would you like more data from my system? attaching "uname -a" in case it helps...

Linux raspbmc 3.6.7 #1 PREEMPT Tue Nov 20 23:18:55 UTC 2012 armv6l GNU/Linux

Let me know,

Tim

@tananaev
Copy link
Member

tananaev commented Dec 9, 2012

Looks like Java Service Wrapper that I am using to make traccar run as a Linux daemon is not compatible with your Linux distribution... The only option left is to run it manually as you mentioned in second post, just fix user permissions.

...or you can try install different raspberry pi Linux distribution.

@tamarko
Copy link
Author

tamarko commented Dec 9, 2012

Thanks Anton,

Just upon doing more reading, I suspect that my instance of java runtime is designed is for soft float (armel implementation rather than armhf). Maybe I can have a crack using a different implementation...

Anyway, OK. Do you have any ideas why traccar is not recieving the monitoring events? As you have seen, I can start the system manually, but traccar is not collecting data - see my second post.

Tim

@tananaev
Copy link
Member

tananaev commented Dec 9, 2012

Here is armel version - https://docs.google.com/open?id=0B2GwK26geA9eR0t1UTlfVk4wSDA

Meanwhile I'll test data from your second post...

@tamarko
Copy link
Author

tamarko commented Dec 9, 2012

OK, My error on the data collection issue, sorry. I failed to update the configuration file for the meitrack protocol.

I can run manually as you have indicated, or maybe change to the hard float implementation. Nevertheless, this appears to be an issue in OS version and compatibility with the wrapper.

Thank you for your help.

Tim

@tananaev
Copy link
Member

Have you tried armel version?

@tamarko
Copy link
Author

tamarko commented Jan 18, 2013

Not yet. Let me I'm away at the moment; let me get back to you

@tananaev
Copy link
Member

tananaev commented Mar 2, 2013

Here is ARM installer that should work on both architectures - https://docs.google.com/file/d/0B2GwK26geA9eTHZEa0NiLTlqbXc/edit?usp=sharing

@tananaev tananaev mentioned this issue Mar 23, 2013
Closed
@1sthandy
Copy link

1sthandy commented Mar 24, 2013

you have to install the binutils to fix this error:

pi@raspbmc:~$ sudo /opt/traccar/bin/traccar start
/opt/traccar/bin/traccar: 1: /opt/traccar/bin/traccar: readelf: not found
Starting traccar...
Segmentation fault
Waiting for traccar..................
WARNING: traccar may have failed to start.

@tamarko
Copy link
Author

tamarko commented Apr 6, 2013

Thanks 1sthandy, binutils certainly addressed the readelf issue.

Sadly Anton, the Segmentation fault issue on the wrapper seems to persist - even with with the special ARM build that you sent me. I've also changed java versions to the more recent java 8. per the below.

pi@raspbmc:~$ java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b36e)
Java HotSpot(TM) Client VM (build 25.0-b04, mixed mode)

Issue is now:

pi@raspbmc:~$ sudo service traccar start
Starting traccar...
Segmentation fault
Waiting for traccar..................
WARNING: traccar may have failed to start.

Is there any logging that I can send you that might help? No urgency as the system obviously runs manually!

@tananaev
Copy link
Member

tananaev commented Apr 6, 2013

Are you using armhf system? It is not compatible with Java Server Wrapper (which is third party module that I use), so it won't work. Only way is to run Traccar manually or from init scripts.

@tamarko
Copy link
Author

tamarko commented Apr 7, 2013

Great, yes on the armhf platform.

No problems, this is as we discussed some months ago. Completely understand.

Thanks Anton.

@domints
Copy link

domints commented Mar 4, 2015

Hi, sorry for digging, but I have found that Java Service Wrapper (I haven't found any mention about Java Server Wrapper) have armhf binaries now. Does it mean, that it will work on Rpi without any problems?
The wrapper I'm talking about is:
http://wrapper.tanukisoftware.com/doc/english/download.jsp
If you're using different one, sorry for my mistake.

@tananaev
Copy link
Member

tananaev commented Mar 4, 2015

They always had armhf version, but it is not compatible with Raspberry Pi.

See following stackoverflow answer:
http://stackoverflow.com/questions/16214468/java-service-wrapper-on-raspberry-pi/16311531#16311531

@domints
Copy link

domints commented Mar 5, 2015

So it's possible to recompile JSW for mine RPi and noone mentioned it before, and it's good news :) And when it wouldn't work even after recompile I would just have to run traccar manually after every boot and it would stay as terminal window, am I right?

@tananaev
Copy link
Member

tananaev commented Mar 5, 2015

You can always run Traccar manually. If you want to recompile JSW please share the result so other people can benefit as well.

@domints
Copy link

domints commented Mar 5, 2015

Yup, that's what I wanted to do :) just when I succed. And small info for
RPi2 users: they don't have to worry about this issue - RPi2 has fully
ARMv7 compatible CPU :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants