[ZBX-11004] Zabbix exiting when unable to connect to MySQL Created: 2016 Jul 19 Updated: 2017 May 30 Resolved: 2016 Jul 22 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Server (S) |
| Affects Version/s: | 3.0.3 |
| Fix Version/s: | None |
| Type: | Incident report | Priority: | Critical |
| Reporter: | Frank | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | connections, mysql | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 14.04, MariaDB 10.1, Zabbix 3.0.3 from repo.zabbix.com |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
After visiting our Zabbix dashboard it mentioned that "the information may not be accurate because Zabbix-server is not running". During an upgrade of MariaDB the mysql-server process was shut down and as a result all Zabbix-server intances died in the process. The downtime was less than a minute, it seems like zabbix-server simply exited without retrying. 7925:20160719:075154.104 [Z3005] query failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") [begin;] 7925:20160719:075154.113 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") 7925:20160719:075154.128 Cannot connect to the database. Exiting... 7907:20160719:075154.707 [Z3005] query failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") [select hostid,status,tls_accept,tls_issuer,tls_subject,tls_psk_identity from hosts where host='server.example.com' and status in (0,1) and flags<>2 and proxy_hostid is null] 7907:20160719:075154.707 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") 7852:20160719:075154.716 One child process died (PID:7925,exitcode/signal:1). Exiting ... 7907:20160719:075154.727 Cannot connect to the database. Exiting... 7852:20160719:075156.751 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") 7852:20160719:075156.751 Cannot connect to the database. Exiting... This should not be desirable behavior as Zabbix-server should retry connecting to the MySQL-server whenever it is unable to do so as it is likely a temporary issue. |
| Comments |
| Comment by Aleksandrs Saveljevs [ 2016 Jul 19 ] |
|
Is this issue specifically for reconnecting during the upgrade procedure or reconnecting in general? If the latter, this looks like a duplicate of |
| Comment by Frank [ 2016 Jul 19 ] |
|
They could be the same thing. |
| Comment by Andrey Melnikov [ 2016 Jul 21 ] |
|
Yet another fatal carelessness. Patch attached. |
| Comment by Viktors Tjarve [ 2016 Jul 22 ] |
|
Fixing |