Server on Raspbery Pi auto shutting down

HJvD8 years ago

Hi,

managed to install a traccar server on my raspberry pi. Working fine but the server is shutting down without me saying so. When starting up I get:

Logging in to the browser interface is working fine. Can also connect with the traccar client and upload location data. But after a while the server is stopping. In order to make it work I increased the max memory limit from 64 to 128. No luck though. Can anyone help me to understand this problem?

The Putty response:

pi@raspberrypi:~$ sudo java -jar /opt/traccar/tracker-server.jar /opt/traccar/co                                                                                                                                                             nf/traccar.xml
[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO 12/26/16 8:30 AM: liquibase: Clearing database change log checksums
INFO 12/26/16 8:30 AM: liquibase: Successfully acquired change log lock
INFO 12/26/16 8:30 AM: liquibase: Successfully released change log lock
INFO 12/26/16 8:30 AM: liquibase: Successfully acquired change log lock
INFO 12/26/16 8:33 AM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO 12/26/16 8:33 AM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO 12/26/16 8:34 AM: liquibase: Successfully released change log lock
[main] INFO org.eclipse.jetty.util.log - Logging initialized @322658ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.19.v20160908
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.Se                                                                                           rvletContextHandler@1d06bbd{/api,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@1                                                                                  dde554{HTTP/1.1}{0.0.0.0:8082}
[main] INFO org.eclipse.jetty.server.Server - Started @430088ms
^C[Thread-13] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConn                                                                                  ector@1dde554{HTTP/1.1}{0.0.0.0:8082}
[Thread-13] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j                                                                               .s.ServletContextHandler@1d06bbd{/api,null,UNAVAILABLE}
pi@raspberrypi:~$

Log:

2016-12-26 08:29:13  INFO: Operating system name: Linux version: 4.1.18+ architecture: arm
2016-12-26 08:29:13  INFO: Java runtime name: OpenJDK Zero VM vendor: Oracle Corporation version: 25.40-b08
2016-12-26 08:29:13  INFO: Memory limit heap: 106mb non-heap: 0mb
2016-12-26 08:29:13  INFO: Character encoding: UTF-8 charset: UTF-8
2016-12-26 08:29:13  INFO: Version: 3.7-SNAPSHOT
2016-12-26 08:34:57  INFO: Starting server...
2016-12-26 08:37:58  INFO: Shutting down server...
Anton Tananaev8 years ago

It seems like it stopped because you pressed Ctrl+C.

HJvD8 years ago

Couldn't imagine I did this so I started Traccar once again without me touching the ctrl+C buttons. No improvement though. Any ideas?

This was the response:

pi@raspberrypi:~$ sudo java -jar /opt/traccar/tracker-server.jar /opt/traccar/conf/traccar.xml
[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO 12/26/16 12:56 PM: liquibase: Clearing database change log checksums
INFO 12/26/16 12:56 PM: liquibase: Successfully acquired change log lock
INFO 12/26/16 12:56 PM: liquibase: Successfully released change log lock
INFO 12/26/16 12:56 PM: liquibase: Successfully acquired change log lock
INFO 12/26/16 1:00 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO 12/26/16 1:00 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO 12/26/16 1:00 PM: liquibase: Successfully released change log lock
[main] INFO org.eclipse.jetty.util.log - Logging initialized @325317ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.19.v20160908
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@764cba{/api,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@1502758{HTTP/1.1}{0.0.0.0:8082}
[main] INFO org.eclipse.jetty.server.Server - Started @435095ms
[qtp28028263-27] WARN org.eclipse.jetty.http.HttpParser - Illegal character 0x16 in state=START for buffer HeapByteBuffer@142f053[p=1,l=170,c=16384,r=169]={\x16<<<\x03\x01\x00\xA5\x01\x00\x00\xA1\x03\x03(\xB0+\xCc\xE4(?...\x01\x04\x03\x05\x03\x06\x03\x02\x03\x05\x02\x04\x02\x02\x02>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
[qtp28028263-27] WARN org.eclipse.jetty.http.HttpParser - badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@1c8e70c{r=0,c=false,a=IDLE,uri=}
^C[Thread-13] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@1502758{HTTP/1.1}{0.0.0.0:8082}
[Thread-13] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@764cba{/api,null,UNAVAILABLE}
HJvD8 years ago

Hm.

Ran some more tests. After starting the server I get no prompt. Don't know why.

Put back my max mem usage to 64. Can login to the browser screen. Login and logout. No crash.

But when I close my Putty screen the server is closing automatic.

No notifications of anything going wrong...

Anton Tananaev8 years ago

You run it from the shell, so when you close Putty (shell), all processes running in that shell are killed. Why are you running Traccar manually? Just use official installer.

HJvD8 years ago

OK,

getting somewhere now.

After using traccar start I get a segmentation fault.

pi@raspberrypi:~/wrapper_prerelease_3.5.17$ sudo /opt/traccar/bin/traccar start
Starting traccar...
Segmentation fault
Waiting for traccar..................
WARNING: traccar may have failed to start.

The I used this item to solve my problem: https://github.com/tananaev/traccar/issues/106 and this https://sourceforge.net/p/wrapper/mailman/message/30767505/

Downloaded and unziped the other version af wrapper to install.

After starting the wrapper service I got this:

pi@raspberrypi:~/wrapper_prerelease_3.5.17$ ./build32.sh

Wrapper Build System
using /home/pi/wrapper_prerelease_3.5.17/./build.xml

./build32.sh: 10: ./build32.sh: /bin/ant: not found

Any ideas?

Anton Tananaev8 years ago

Please download the latest official release and follow instructions in the README file. If something doesn't work after that, check logs.

HJvD8 years ago

OK Anton,

but 3.7 is the latest version available for ARM processors...

Anton Tananaev8 years ago

What made you think so? Starting from 3.8 there is a single universal package that works on all platforms.

HJvD8 years ago

You mean the linux package or the "other" package?

Anton Tananaev8 years ago

I mean Linux package obviously.

HJvD8 years ago

OK,

Install went fine, starting up with sudo /opt/traccar/bin/startDaemon.sh giving an error and no start of the server:

pi@raspberrypi:~$ sudo /opt/traccar/bin/startDaemon.sh
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK Zero VM (build 25.40-b08, interpreted mode)
wrapper home : /opt/traccar
configuration: /opt/traccar/conf/wrapper.conf
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK Zero VM (build 25.40-b08, interpreted mode)
---------- YAJSW SET ENV ----------
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK Zero VM (build 25.40-b08, interpreted mode)
wrapper home : /opt/traccar
configuration: /opt/traccar/conf/wrapper.conf
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK Zero VM (build 25.40-b08, interpreted mode)
---------- YAJSW SET ENV ----------
YAJSW: yajsw-beta-12.07
OS   : Linux/4.1.18+/arm
JVM  : Oracle Corporation/1.8.0_40-internal//usr/lib/jvm/java-8-openjdk-armhf/jre/32
Dec 27, 2016 11:30:23 AM org.apache.commons.vfs2.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
Dec 27, 2016 11:30:40 AM org.rzo.yajsw.os.posix.PosixService init
INFO: /etc/init.d/traccar already exists
************* STARTING traccar ***********************

Dec 27, 2016 11:30:40 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Dec 27, 2016 11:31:25 AM org.rzo.yajsw.os.posix.PosixUtils osCommand
WARNING: Error executing "/opt/traccar/bin/traccar start": java.util.concurrent.TimeoutException
Dec 27, 2016 11:31:25 AM org.rzo.yajsw.os.posix.PosixService start
INFO: null
Dec 27, 2016 11:31:25 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Dec 27, 2016 11:31:26 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Dec 27, 2016 11:31:27 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Dec 27, 2016 11:31:28 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Service traccar NOT started
HJvD8 years ago

Ok, in the meantime I increased wrapper.startup.timeout=180 as suggested in the wrapper.log file. Same problem though.

Anton Tananaev8 years ago

Not sure what the problem is. I can take a look if you provide SSH access to the server.

HJvD8 years ago

What channel would you like me to use for a personal message?