[ZBX-12233] Zabbix server stops when MariaDB is down Created: 2017 May 29  Updated: 2024 Apr 10  Resolved: 2017 Jul 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 3.0.10rc1
Fix Version/s: 3.4 (plan)

Type: Problem report Priority: Trivial
Reporter: Andris Mednis Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian GNU/Linux 9 (testing)
MariaDB 10.1.23
MariaDB Connector/C 2.3.2


Team: Team A
Sprint: Sprint 12
Story Points: 0

 Description   

Zabbix server v3.0.10rc1 with MariaDB stops when DB is down:

 10079:20170529:135153.300 [Z3001] connection to database 'zabbix30' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 10079:20170529:135153.300 cannot set MySQL character set to "utf8"
 10079:20170529:135153.300 Cannot connect to the database. Exiting...

This fix helps:

Index: src/libs/zbxdb/db.c
===================================================================
--- src/libs/zbxdb/db.c (revision 68585)
+++ src/libs/zbxdb/db.c (working copy)
@@ -257,6 +257,7 @@
                case ER_ACCESS_DENIED_ERROR:            /* wrong user or password */
                case ER_ILLEGAL_GRANT_FOR_TABLE:        /* user without any privileges */
                case ER_TABLEACCESS_DENIED_ERROR:       /* user without some privilege */
+               case CR_CANT_READ_CHARSET:
                case ER_UNKNOWN_ERROR:
                        return SUCCEED;
        }

Generated at Tue Jul 08 09:27:45 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.