Looks like a driver compatibility issue or something like that.
I am also having the same issue, not sure if I should downgrade mariadb image or the issue will be fixed in Traccar soon
@Ahmad you have problems with other services using the mariadb, or only with traccar??
I only have problems with traccar, the other services than use mariadb works great (kodi, homeassistant,nginx....).
I think its something related with the connection and maybe it will be solved changing the connection parameters in traccar.xml. but i dont have enought knowledge :-(
It is only Traccar that stopped working, I am using same image for homeassistant and it is working fine.
As a temporarly solution, I downgraded to 10.10 and it started working again.
It's probably some incompatibility between MariaDB and MySQL driver.
Same error here after upgrading to 11.0.2
Traccar DB Config
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://192.168.1.101:3306/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
MariaDB Error
2023-06-24 12:02:58 21 [Warning] Aborted connection 21 to db: 'traccar' user: 'traccar' host: '172.25.0.1' (Got an error reading communication packets)
Snippet of Traccar errors
Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:894)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:819)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
... 33 more
Caused by: com.mysql.cj.exceptions.CJException: Unknown system variable 'transaction_isolation'
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Try it with MariaDB driver:
https://github.com/traccar/traccar/commit/f8adf8eff8cc094e6a1a583a4fb3a11c6e8752e2
Thanks Anton. Will work on this soon. Will the driver automagically be loaded via Gradle regardless of the Traccar version?
Driver syntax here: https://mariadb.com/kb/en/about-mariadb-connector-j/
You have to build a new version.
All good. I will just wait for 5.9 :)
I just upgraded mariadb to 11.0.2 and getting this error. Is 5.9 coming soon, or should I plan to downgrade mariadb?
Or, is there a build with the mariadb driver available?
Thanks, that's a life saver!
Working now with minimal changes to traccar.xml, i.e changing database.driver to "org.mariadb.jdbc.Driver", and in database.url "jdbc:mysql" to "jdbc:mariadb"
hello.
I installed the mariadb in docker version 11.0.2
After in other docker trying to install traccar.
NOT WORKS. the error is this:
After this i install other version of mariadb, 10.3. in other port
and use the exact same configuration of traccar docker (I only change the port 3306 of the one mariadb to other mariadb in port 3307)
And works perfect.
Its posible something change in mariadb and the connection not works?
anyone have this problem??
thanks a lot!