what mysql version works ok to traccar-linux-64-4.1

Angel Feu7 years ago

Hello
I need to know which mysql version works correctly to traccar 4.1 linux since I install but does not run the traccar service.
On one occasion, after starting many times, I created the tables, but did not connect and did not open the web page.
thenk you

Anton Tananaev7 years ago

If something doesn't work, you should probably check logs.

Mervyn Augustus7 years ago

I too am trying to figure this thing out. I absolutely love how traccar works and it's been a hit for keeping track of my "fleet" (2 cars and a bike) ,my kid's gps watches & a couple of my workers phones, (the latest version of the client app has really cool features BTW).
But now I'm trying to beef it up to use for my delivery vehicles and some assets for family and friends.
I did a clean (latest) install on CENTOS 7 and tried setting up mysql 8.0 to handle the extra load and stuff.
I created the database and credentials manually and things looked promising.
All worked fine till I followed the instructions in documentation "MySQL Database"
When I restarted the traccar service (systemctl status traccar.service), it fails...
(code=exited, status=1/FAILURE)

Nov 07 16:08:42 localhost.localdomain traccar[8645]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
Nov 07 16:08:42 localhost.localdomain traccar[8645]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
Nov 07 16:08:42 localhost.localdomain traccar[8645]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
Nov 07 16:08:42 localhost.localdomain traccar[8645]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
Nov 07 16:08:42 localhost.localdomain traccar[8645]: at com.mysql.jdbc.authentication.CachingSha2PasswordPlugin.nextAuthenticationS...a:130)
Nov 07 16:08:42 localhost.localdomain traccar[8645]: at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO....:1775)
Nov 07 16:08:42 localhost.localdomain traccar[8645]: ... 25 more
Nov 07 16:08:42 localhost.localdomain systemd[1]: traccar.service: main process exited, code=exited, status=1/FAILURE
Nov 07 16:08:42 localhost.localdomain systemd[1]: Unit traccar.service entered failed state.

I know I should be checking the logs but not entirely sure what I should be looking for.
Or even which logs to begin with.
Taking a wild guess (also, tracker server log: HikariPool-1 - Exception during pool initialization. - Could not create connection to database server. Attempted reconnect 3 times. Giving up) I'm thinking that I could not create a connection to database server.
I have theories but without any "real" knowledge I may be way off base.
Is there a checklist I can follow in order to track down the offending problem and snuff it out?
Thanks in advance...

Anton Tananaev7 years ago

Seems like database connection details are incorrect, or database doesn't accept network connections at all.

Mervyn Augustus7 years ago

ok. I wonder. I ran a command shortly after I installed mysql that "secured" the install. mysql_secure_installation it was i think. you think that might be the foul up? I can Google how to reinstall mysql, probably it'll undo my dumb@$$ery and I get to try again?

Anton Tananaev7 years ago

Most likely that is the problem. Re-installing might not help because configuration files are usually persisted. You need to open and allow network connection to MySQL instance.

Mervyn Augustus7 years ago

makes sense. now, I admit, i gots no clue how to do this so i'm gonna have to spend some time probing the allmighty GOOGLE for the proper syntax. finding the solutions are the best part, aye? that's where the fun is. I'll post success when I get through...

Mervyn Augustus7 years ago

Check this out.
I ran a command mysqladmin variables -p
and it spit out all the current settings for mysql and i saw that the bind address was just an asterisk (*) I'm thinking that it means that I am not bound to some kinda funky ipv6 address, so localhost and 127.0.0.1 is fair game. Correct me if I'm too far off the reservation here... I'm not as cool as you guys...
same thing for the mysqlx bind address
skip networking is also off.

also i got this

[root@localhost ~]# mysqladmin -h `hostname` --port=3306 version -p
Enter password: 
mysqladmin  Ver 8.0.13 for Linux on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version		8.0.13
Protocol version	10
Connection		localhost.localdomain via TCP/IP
TCP port		3306
Uptime:			8 hours 54 min 23 sec

I'm thinking that all this may suggest that network connections to mysql database are allowed, is it?

Anton Tananaev7 years ago

I would recommend you to check Traccar logs to see full stack trace.

Mervyn Augustus7 years ago

I got it...
1 word 2 syllables.

firewall.

maybe that's three syllables.
anyways... I opened up the ports in the firewall for the http server, the ports for my devices (5055, 5002 & 5023) and then..... 3306.

then BLADDAMN!
I restart the traccar service and then I checked status.
You were right, the traccar server logs said that I just wasn't connecting to db server, at all, even though I'm using the default sql port...
firewall was blocking it on public and well.... you get the picture.
Thanks man....

Angel Feu7 years ago
Anton Tananaev7 years ago

Traccar doesn't have such functionality.