[MDEV-25309] [Warning] Aborted connection ID to db: 'DB_NAME' user: 'USER_NAME' host: 'HOST_NAME' (Got an error writing communication packets) Created: 2021-03-31  Updated: 2023-06-06  Resolved: 2023-06-06

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Insert, Galera
Affects Version/s: 10.5.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Diana Duca Assignee: Jan Lindström
Resolution: Not a Bug Votes: 0
Labels: Galera
Environment:

Production



 Description   

We have a mariadb 3-node Cluster (Galera) version 10.5.5. We are getting the following warnings in the database error log:

2021-03-30 11:15:42 375 [Warning] Aborted connection 375 to db: 'DB_NAME' user: 'USER_NAME' host: 'HOST_NAME' (Got an error writing communication packets)

At the same time at the application level, the user performing the insert operations gets the following errors:

2021-03-30 11:15:24.915 SEVERE [SFCScheduler_Worker-1]
Caused by: java.sql.SQLNonTransientConnectionException: (conn=375) unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
... 5 more
Caused by: java.sql.SQLException: unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
Query is: COMMIT

We have checked the following parameters at database level:

MariaDB [(none)]> SHOW VARIABLES LIKE "%version%";
---------------------------------------------------------------------------+

Variable_name Value

---------------------------------------------------------------------------+

in_predicate_conversion_threshold 1000
innodb_version 10.5.5
protocol_version 10
slave_type_conversions  
system_versioning_alter_history ERROR
system_versioning_asof DEFAULT
tls_version TLSv1.1,TLSv1.2,TLSv1.3
version 10.5.5-MariaDB
version_comment MariaDB Server
version_compile_machine x86_64
version_compile_os Linux
version_malloc_library system
version_ssl_library OpenSSL 1.0.2k-fips 26 Jan 2017
wsrep_patch_version wsrep_26.22

---------------------------------------------------------------------------+
15 rows in set (0.001 sec)

MariaDB [(none)]>
MariaDB [(none)]> show global status like '%abort%';
-------------------------------+

Variable_name Value

-------------------------------+

Aborted_clients 126
Aborted_connects 34
Aborted_connects_preauth 7
wsrep_local_bf_aborts 1295

-------------------------------+
4 rows in set (0.001 sec)

MariaDB [(none)]> show global variables like 'wait_timeout';
--------------------+

Variable_name Value

--------------------+

wait_timeout 28800

--------------------+
1 row in set (0.001 sec)

MariaDB [(none)]> show global variables like 'interactive_timeout';
--------------------------+

Variable_name Value

--------------------------+

interactive_timeout 28800

--------------------------+
1 row in set (0.001 sec)

MariaDB [(none)]> show global variables like 'max_allowed_packet';
------------------------------+

Variable_name Value

------------------------------+

max_allowed_packet 1073741824

------------------------------+
1 row in set (0.001 sec)

MariaDB [(none)]> show global variables like 'max_connections';
----------------------+

Variable_name Value

----------------------+

max_connections 151

----------------------+
1 row in set (0.001 sec)

MariaDB [(none)]> show global variables like 'innodb_log_%';
--------------------------------------+

Variable_name Value

--------------------------------------+

innodb_log_buffer_size 16777216
innodb_log_checksums ON
innodb_log_compressed_pages ON
innodb_log_file_size 100663296
innodb_log_files_in_group 1
innodb_log_group_home_dir ./
innodb_log_optimize_ddl OFF
innodb_log_write_ahead_size 8192

--------------------------------------+
8 rows in set (0.001 sec)

MariaDB [(none)]>

But we are not able to see the root cause of those "writing communication packets" issues and the timeouts at the application level. ¿Could you please give us some support in order to solve those issues? Thank you.

Best regards,
Diana.



 Comments   
Comment by Diana Duca [ 2021-04-13 ]

We are still receiving timeout errors.

At the application level, we are facing the following errors:

13-Apr-2021 11:46:14.196 SEVERE [XXXScheduler_Worker-1] .........service.XXXServiceLogger.log ____ERROR____
... 4 more
Caused by: java.sql.BatchUpdateException: (conn=1190578) unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
at org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:275)
at org.mariadb.jdbc.MariaDbStatement.executeBatch(MariaDbStatement.java:1252)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeBatch(NewProxyStatement.java:1013)
at com.cepsa.aeess.sfc.service.dao.ServiceDBManager.clonarTablasActivas(ServiceDBManager.java:304)
... 5 more
Caused by: java.sql.SQLNonTransientConnectionException: (conn=1190578) unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:175)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:110)
at org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:272)
... 8 more
Caused by: java.sql.SQLException: unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
Query is: insert into tsfc_ptoprd_1(explot, fec_ini_vigencia, tipcod, codcpr, eotpto, coddiv, otorga, canjeo, cndobt, tipmed, codmed, codcbe, tslast, tscrea) select explot, fec_ini_vigencia, tipcod, codcpr, eotpto, coddiv, otorga, canjeo, cndobt, tipmed, codmed, codcbe, tslast, tscrea from tsfc_ptoprd_0

At the database level in the error log we are seeing the same connection ID aborted:

...................................................................................
2021-04-13 11:48:46 1190578 [Warning] Aborted connection 1190578 to db: 'SFC_PRO' user: 'adm_sfc' host: 'srv10718_v287.cepsacorp.es' (Got an error writing communication packets)
..................................................................................

¿Could you please help and give some advice in order to get to the root cause? Thank you.

Comment by Jan Lindström [ 2023-06-06 ]

Aborted connections are expected in case of cluster conflicts as conflicting local operations may be aborted. If you think there is some bug you should provide full error log from all the nodes and describe your cluster setup more detailed way.

Generated at Thu Feb 08 09:36:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.