Quarkus-based distribution cannot use MariaDB with Galera replication due to XA transactions being unsupported
See original GitHub issueDescribe the bug
Using the Quarkus-based version of Keycloak 17.0.0 with a MariaDB backend with Galera replication enabled fails to start. Galera does not yet support XA transactions which Keycloak uses.
Version
17.0.0
Expected behavior
Keycloak should start normally and create a database.
Actual behavior
Keycloak fails to start with
WARN [com.arjuna.ats.jta] (main) ARJUNA016061: TransactionImple.enlistResource - XAResource.start returned: ARJUNA016099: Unknown error code:0 for < formatId=131077, gtrid_length=35, bqual_length=36, tx_uid=0:ffffac120005:92f9:620a53be:0, node_name=quarkus, branch_uid=0:ffffac120005:92f9:620a53be:3, subordinatenodename=null, eis_name=0 >: javax.transaction.xa.XAException: (conn=140) This version of MariaDB doesn't yet support 'XA transactions with Galera replication'
How to Reproduce?
- Set up a MariaDB with Galera replication enabled. No actual clustering is needed.
- Build Keycloak with
--db=mariadb
- Start Keycloak using the Galera-replicated MariaDB as database
Anything else?
I’ve tried disabling XA transactions using quarkus.datasource.jdbc.transactions=enabled
in conf/quarkus.properties
before building Keycloak, but still get the same error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
MariaDB Galera Cluster - Known Limitations
This article contains information on known problems and limitations of MariaDB Galera Cluster. Limitations from codership.com: Currently replication works ...
Read more >XA Transactions - MariaDB Knowledge Base
XA transactions are designed to allow distributed transactions, where a transaction manager (the application) controls a transaction which involves multiple ...
Read more >About Galera Replication - MariaDB Knowledge Base
In MariaDB Cluster, the Server replicates a transaction at commit time by broadcasting the write set associated with the transaction to every node...
Read more >Tips on Converting to Galera - MariaDB Knowledge Base
You can use MyISAM and MEMORY for data that does not need to be replicated. Also, you should use "START TRANSACTION READONLY" wherever...
Read more >What is MariaDB Galera Cluster?
Benefits. The above features yield several benefits for a DBMS clustering solution, including: No replica lag; No lost transactions; Read scalability; Smaller ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So @999eagle fyi, this behaviour will change in the next version / latest main, you only need to run
kc.sh build --db=mariadb --transaction-xa-enabled=false
, no System Properties involved anymore.Hi all, I’ve tried again with
-Dkc.db-tx-type=enabled -Dkc.db-driver=org.mariadb.jdbc.Driver
and this seems to work. Thanks!