Connection Closed/Reset to MariaDB Mysql

Hi, I installed MariaDB on a server (ip 192.168.1.245) and I connect with Libreoffice front end and JDBC connector (MariaDB specific) . I can access to the DB from different PCs and for the most part there are no problems, but from two PCs I receive different types of errors: Connection Closed, Connection Reset, the data content could not be loaded when I open a form and an error related to CYGWIN64 is identified
Can anyone help me?


Buongiorno,
ho installato su un server MariaDB (192.168.1.245) e mi connetto con front end Libreoffice e connettore JDBC (specifico di MariaDB)
L`accesso avviene da diversi PC e per la maggior parte non ci sono problemi, ma da due pc ricevo errori di diverso tipo Connection Closed, Connection Reset,
the data content could not be loaded quando apro un form con errori collegati a CYGWIN64
qualcuno sa come aiutarmi?

All systems are in the same network (Home/Company/not www)?
Then: Try in Tools → SQL
SELECT CONNECTION_ID()
and let you show the output.
Hope all IDs are different.
You could also try to add the parameter autoReconnect=true to the database, but this wont help to find the reason of the different behavior.

By the way: all the information about “at C:/cygwin…” are useless informations, which appear in much messageboxes in Base. You could ignore this. The information “Connection is closed” is what you need.

SELECT CONNECTION_ID()

On the working computer
1: command executed correctly

On the two troubled computers it gives me

1: (conn=40) (conn=40) Connection is closed at C:/cygwin64/home/buildslave/source/libo-core/connectivity/source/drivers/jdbc/Object.cxx:172
1: (conn=41) (conn=41) Connection is closed at C:/cygwin64/home/buildslave/source/libo-core/connectivity/source/drivers/jdbc/Object.cxx:172

But from BASE If I run
modify → database → properties → try the connection

it gives me

Prova di connessione at C:/cygwin64/home/buildslave/source/libo-core/dbaccess/source/ui/dlg/sqlmessage.cxx:571
La connessione è stata stabilita correttamente.
(The connection has been successfully established.)

I can’t really understand why

Connecting with HeidiSQL to the MariaDB server on the PROCESSLIST table I can see that the users are connect with different IDs, but when I try to open a form on the two computers (regardless of the user I am using) it disappears from the list and I get the connection close error

Some additional information:
the MariaDB server is at IP 192.168.1.245
Computers are in the subnet 192.168.2.x
Through HeidiSQL on Mariadb, users are authorized from host 192.168.% (and for the other computers an the same subnet it works good)
In the picture there you can see what I see on PROCESSLIST during a session:
the ‘good’ computer uses the user Tiziano
the ‘bad’ computer uses the user Valentina
launching the same FORM both show up with different IDs, but at some point the connection closes for the problem computer and the user Valentina disappears from PROCESSLIST

all computers have LO
Version: 24.2.4.2 (X86_64) / LibreOffice Community
ID build: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
Thread della CPU: 4; OS: Windows 10.0 ( or 11) Build 19045; UI rendering: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: threaded

There are different connection types possible to MariaDB:

JDBC connected through wizard of LO (MySQL/MariaDB JDBC-driver org.mariadb.jdbc.Driver)
→ «Databasename»?permitMysqlScheme (you have to add this to connect)

JDBC connection through wizard of LO, but JDBC defined completly
→ jdbc:mariadb://«HostOfDatabase»:3306/«Databasename» (note there is written mariadb at the start of the connection string)

… and you could also connect with direct driver to MariaDB. You won’t need JDBC.

Might also be you included the JDBC driver in different ways. I prefer the solution to put it into classpath by LO (Settings for Java).

Seems you are using different Windows-systems (10 or 11), but I don’t know anything about Windows…

in all Computers there is the JDBC connection through classpath mariadb-java-client-2.7.0.jar
the driver class I use is org.mariadb.jdbc.Driver

what drive me crazy is that the same configuration does not work in only 2 computers, I also thought it was a hardware problem (cables, switches…) because the two computers are close to each other, but I don’t understand why this problem occurs only on the db and not on the intranet connections

Update:
I realized that the number that results in the error (example conn=40) is the connection_ID of mariadb [it was probably trivial for you, but not for me :smiling_face: ].
Another test I performed: if I run a query in libreoffice the system does not crash. As soon as I run the form linked to the query (which is just a graphical modification of the same query) the connection closes.
Same thing when I open the input form (which starts from a Select).
I also don’t understand how this is possible