Unable to Install Traccar Server

Vimal Tank6 years ago

Hello,

I followed the instructions on Link .

Including a completely new droplet, and Tried the same instructions on a different OpenVZ based VPS.

I am just not able to install using those commands, Am I missing something, Has there been any changes to this method?

Thanks in Advance for any help

Andy6 years ago

Hi Vimal,

What operating system are you using? Ubuntu 16.04, 18.04 or other? What error are you seeing if any or at which point are you having a problem?

-Andy

Andres Merino6 years ago

Hello Vimal,

Try placing :8082 when you finish your IP address of your server or droplet.
Example : http://206.189.67.175:8082/

-Andres

Vimal Tank6 years ago

Thank You for helping.

I used the operating system Ubuntu 16.04, and tried used the same commands listed there.

Fresh Installation of Ubuntu on a newly created Droplet with Digital Ocean
Commands Used -
1 - apt-get update

2 - apt-get install unzip default-jre mysql-server

3 - echo "create database traccar" | mysql -u root -p

4 - wget https://github.com/tananaev/traccar/releases/download/v3.16/traccar-linux-3.16.zip

5 - unzip traccar-linux-*.zip

6 - ./traccar.run

7 - nano traccar.xml
Added the below mentioned code

<?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'>root</entry>
    
    <entry key='server.timeout'>120</entry>

</properties>

CTRL + X to Exit and then Y to confirm.

8 - cp traccar.xml /opt/traccar/conf/
9 - rm -f traccar.run README.txt traccar-linux-*.zip
10 - printf '#!/bin/sh\nfind /opt/traccar/logs/ -mtime +5 -type f -delete\n' > /etc/cron.daily/traccar-clear-logs && chmod +x /etc/cron.daily/traccar-clear-logs
11 - /opt/traccar/bin/startDaemon.sh - Service Traccar Started
12 - tail -f /opt/traccar/logs/wrapper.log.* - Shows the below mentioned data.

==> /opt/traccar/logs/wrapper.log.20180629 <==
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.MysqlI                                                                                        O.checkErrorPacket(MysqlIO.java:3973)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.MysqlI                                                                                        O.checkErrorPacket(MysqlIO.java:3909)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.MysqlI                                                                                        O.checkErrorPacket(MysqlIO.java:873)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.MysqlI                                                                                        O.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.MysqlI                                                                                        O.doHandshake(MysqlIO.java:1226)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.Connec                                                                                        tionImpl.coreConnect(ConnectionImpl.java:2188)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        at com.mysql.jdbc.Connec                                                                                        tionImpl.connectWithRetries(ConnectionImpl.java:2035)
FINEST|7544/0|Service traccar|18-06-29 09:49:16|        ... 28 more
INFO|wrapper|Service traccar|18-06-29 09:49:16|waitpid 7544 59136
INFO|wrapper|Service traccar|18-06-29 09:49:16|exit code posix process: 59136 ap                                                                                        plication(status/signal): 231/0

==> /opt/traccar/logs/wrapper.log.20180629.lck <==

When I go to IP address or IP address:8082 it says site cannot be reached.

-Vimal Tank

Andy6 years ago

Hi Vimal,

Is the firewall on the server enabled? Please type the following command:

ufw status

This will either say "inactive" or "active" and list firewall rules. If it is inactive you will need to open the port for Traccar by typing:

ufw allow 8082

Otherwise, please restart traccar by running:

/opt/traccar/bin/stopDaemon.sh

then

/opt/traccar/bin/startDaemon.sh

then share the output here.

It may be that your server isn't connecting to mysql properly.

Andy6 years ago

sorry, i mean't to say if the firewall is ACTIVE not inactive you will need to open the port

Vimal Tank6 years ago

Thanks for the help.

Firewall is Inactive

I have pasted the whole list of command and output in this link - https://pastebin.com/zTcqcDn0

Sorry i dont mean to make you read the whole thing, But i feel it may help you narrow down the issue better and help me in turn.

Thank You
'''

Anton Tananaev6 years ago

You need to check logs properly.

Vimal Tank6 years ago

Hey Anton,

I couldnt understand where I went wrong, If you can tell me which log are asking me to look at that would be great.

Thank You,
Vimal Tank

Anton Tananaev6 years ago

You need to check wrapper log.

Vimal Tank6 years ago

wrapper pid file: /run/wrapper.traccar.pid - org.rzo.yajsw.os.posix.PosixService getPid

is this the one you referring to?

Thanks for taking the time to help.

Anton Tananaev6 years ago

I'm referring to wrapper log file.

Vimal Tank6 years ago
    <entry key='database.user'>root</entry>
    <entry key='database.password'>root</entry>

looks likes the issue!
I do see an error in mysql connection

Let me see if I can get it fixed based on this

Vimal Tank6 years ago

Genuis!!!

It solved my concern

I have same problem,,how did you solve this problem??