installation linux version

Abou5 years ago

Hello;
i'm installing traccar v6.4 of linux on local server (ubuntu 16) after the finsh installation when i put the server adresse and default port (serverAdresse: 8082) is not working.

skyking5 years ago

Did you install as root?

Try 'sudo service traccar restart'

Look in log file for errors (sudo cat /opt/traccar/logs/tracker-server.log)

Abou5 years ago

yes!! i insalled it as root

Abou5 years ago

No thing in this directory /opt/traccar/logs/tracker-server.log

root@ubuntu:~# sudo systemctl start traccar.service
root@ubuntu:~# ls /opt/traccar/
conf  data  jre  lib  logs  schema  templates  tracker-server.jar  web
root@ubuntu:~# ls /opt/traccar/logs/
root@ubuntu:~#
skyking5 years ago

That means the server has not started and created an initial log file.

The setup script should have done this, but try manually (use sudo if not root)

chmod 664 /etc/systemd/system/traccar.service
systemctl daemon-reload
systemctl enable traccar.service
Abou5 years ago

Is not working and this is all what i did to install traccar server v4.6 on my local server

root@ubuntu:~# unzip traccar-linux-64-4.6.zip
Archive:  traccar-linux-64-4.6.zip
replace traccar.run? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: traccar.run
  inflating: README.txt
root@ubuntu:~# ./traccar.run
Creating directory out
Verifying archive integrity...  100%   All good.
Uncompressing traccar  100%
Created symlink from /etc/systemd/system/multi-user.target.wants/traccar.service to /etc/systemd/system/traccar.service.
root@ubuntu:~# systemctl start traccar.service
root@ubuntu:~# chmod 664 /etc/systemd/system/traccar.service
root@ubuntu:~# systemctl daemon-reload
root@ubuntu:~# systemctl enable traccar.service
root@ubuntu:~# cat /opt/traccar/logs/tracker-server.log
cat: /opt/traccar/logs/tracker-server.log: Aucun fichier ou dossier de ce type
root@ubuntu:~#
skyking5 years ago

That all looks right

run 'sudo ps ax | grep traccar' and you should see: /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml

If not, traccar is not starting

Try runninig sudo /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml

and look for startup errors

Abou5 years ago

is not working

skyking5 years ago

Any errors running sudo /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml ?

Abou5 years ago

this is the screen log

root@ubuntu:~# ps ax | grep traccar
  486 pts/1    S+     0:00 grep --color=auto traccar
 2062 pts/1    T      0:00 vi traccar.xml
root@ubuntu:~# clear
root@ubuntu:~# ps ax | grep traccar
  489 pts/1    R+     0:00 grep --color=auto traccar
 2062 pts/1    T      0:00 vi traccar.xml

root@ubuntu:~# systemctl status traccar
● traccar.service - traccar
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset:
   Active: failed (Result: exit-code) since jeu. 2019-10-17 15:57:06 GMT; 15min
 Main PID: 28923 (code=exited, status=203/EXEC)

oct. 17 15:57:06 ubuntu systemd[1]: Started traccar.
oct. 17 15:57:06 ubuntu systemd[1]: traccar.service: Main process exited, code=e
oct. 17 15:57:06 ubuntu systemd[1]: traccar.service: Unit entered failed state.
oct. 17 15:57:06 ubuntu systemd[1]: traccar.service: Failed with result 'exit-co

root@ubuntu:~# /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
-bash: /opt/traccar/jre/bin/java : impossible d’exécuter le fichier binaire : Erreur de format pour exec()
root@ubuntu:~#
Abou5 years ago

See that

oct. 17 16:21:20 ubuntu systemd[1]: Started traccar.
oct. 17 16:21:20 ubuntu systemd[1]: traccar.service: Main process exited, code=e
oct. 17 16:21:20 ubuntu systemd[1]: traccar.service: Unit entered failed state.
oct. 17 16:21:20 ubuntu systemd[1]: traccar.service: Failed with result 'exit-co
user@ubuntu:~$ sudo /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
/opt/traccar/jre/bin/java: 2: /opt/traccar/jre/bin/java: Syntax error: Unterminated quoted string
skyking5 years ago

From running ps ax it looks like you have the traccar.xml file open with vi editor
Why are you editing this?
Close the file
restart

If you modified or added anything check for quotes

Abou5 years ago

I save traccar.xml fil and i restart my server but tje probleme is persist

root@ubuntu:~# systemctl start traccar.service
root@ubuntu:~# systemctl status traccar
● traccar.service - traccar
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset:
   Active: failed (Result: exit-code) since ven. 2019-10-18 08:58:53 GMT; 13s ag
  Process: 5214 ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf
 Main PID: 5214 (code=exited, status=203/EXEC)

oct. 18 08:58:53 ubuntu systemd[1]: Started traccar.
oct. 18 08:58:53 ubuntu systemd[5214]: traccar.service: Failed at step EXEC spaw
oct. 18 08:58:53 ubuntu systemd[1]: traccar.service: Main process exited, code=e
oct. 18 08:58:53 ubuntu systemd[1]: traccar.service: Unit entered failed state.
oct. 18 08:58:53 ubuntu systemd[1]: traccar.service: Failed with result 'exit-co

root@ubuntu:~# /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
-bash: /opt/traccar/jre/bin/java : impossible d’exécuter le fichier binaire : Erreur de format pour exec()
root@ubuntu:~#

This the content of traccar.xml file

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key="config.default">./conf/default.xml</entry>

    <entry key='web.port'>80</entry>

    <entry key='geocoder.enable'>false</entry>

    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost/traccar?allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>root</entry>
    <entry key='database.password'>sumysql</entry>

    <entry key='server.timeout'>120</entry>

</properties>
Slawek5 years ago
<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://127.0.0.1:3306/traccar?serverTimezone=UTC&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>root</entry> 
    <entry key='database.password'>sumysql</entry>
Abou5 years ago

i changed the file content but the probleme is persiste and i have no file log in logs/ directory
now what you recommande me to do