problems in docker installation with mariadb 11.0.2

DAVIZINHOa year ago

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:

2023-06-13 11:23:16  INFO: Version: 5.8
2023-06-13 11:23:16  INFO: Starting server...
2023-06-13 11:23:17  INFO: HikariPool-1 - Starting...
2023-06-13 11:23:23 ERROR: HikariPool-1 - Exception during pool initialization. - Unknown system variable 'transaction_isolation' - CJException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < MainModule:123 < ...)
2023-06-13 11:23:23 ERROR: Main method error - Unknown system variable 'transaction_isolation' - CJException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < MainModule:123 < ...)

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!

Anton Tananaeva year ago

Looks like a driver compatibility issue or something like that.

Ahmad Yusufa year ago

I am also having the same issue, not sure if I should downgrade mariadb image or the issue will be fixed in Traccar soon

DAVIZINHOa year ago

@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 :-(

Ahmad Yusufa year ago

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.

Anton Tananaeva year ago

It's probably some incompatibility between MariaDB and MySQL driver.

jasonshearera year ago

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&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;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)
Anton Tananaeva year ago
jasonshearera year ago

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/

Anton Tananaeva year ago

You have to build a new version.

jasonshearera year ago

All good. I will just wait for 5.9 :)

Neil Romiga year ago

I just upgraded mariadb to 11.0.2 and getting this error. Is 5.9 coming soon, or should I plan to downgrade mariadb?

Neil Romiga year ago

Or, is there a build with the mariadb driver available?

Anton Tananaeva year ago
Neil Romiga year ago

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"