4.1 - Traccar stops running when closing the Putty screen

Sean Hay5 years ago

Hello

I am running VPS with Centos 7.5 and WHM cPanel v76.0.4
4 virtual cpu's, 8192mb RAM, only 4.1 Traccar is running on this server.
openjdk version "1.8.0_191" , OpenJDK Runtime Environment (build 1.8.0_191-b12) , OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

  1. Install Traccar
  2. Start service with > "sudo systemctl start traccar.service" -- does not do anything. Blank web page with "Site cant be reached"
  3. cd to "opt" and run "sudo java -jar tracker-server.jar conf/traccar.xml" and everything works.
  4. The moment I close my Putty screen, Traccar gives a "Web Socket Error" and stops working. (both as root and user for the domain)
  5. I reboot the server and then go to Traccar page and get the turning circle but no login.
  6. Putty in again and run "sudo java -jar tracker-server.jar conf/traccar.xml" and everything works.
  7. Close Putty and Traccar "Web Socket Error" and stops working.

Thank you
Sean

Anton Tananaev5 years ago

Obviously if you start process in Putty console, it will be killed as soon as you close session.

imarinkovic5 years ago

Can you copy the Traccar log after executing "sudo systemctl start traccar.service" ??

Josue5 years ago

if i run sudo java -jar tracker-server.jar conf/traccar.xml using a bash script with cron? traccar will be online permanently?

Anton Tananaev5 years ago

That's just completely wrong. If you want to run it as a service, you need to configure it to be a service.

Sean Hay5 years ago

Hi Everyone, thank you for all the comments.
I am not a programmer and still learning to be technical-ish with servers.

So how do I set it up as a service please?

Thank you
Sean

Anton Tananaev5 years ago

Traccar is a server software, so it requires certain level of technical knowledge, but it has nothing to do with programming.