[ZBX-15829] Zabbix Server DB is unstable Created: 2019 Mar 15  Updated: 2019 Nov 04  Resolved: 2019 Mar 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Critical
Reporter: da-ishi Assignee: Arturs Lontons
Resolution: Won't fix Votes: 1
Labels: highavailability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 4.0.3
DB:MySQL 5.6.10a


Attachments: JPEG File history.jpg    

 Description   

Zabbix DB is using AWS Aurora MySQL.
After Aurora fails over, there are times when items that can be acquired by Zabbix server can and can not be acquired.
That state will continue for a long time.
Restarting the Zabbix server process will output the values correctly.
Is this a bug?
Or is there a function to clear the cache of DNS?

 

Log:
3225:20190306:153313.135 [Z3005] query failed: [1290] The MySQL server is running with the --read-only option so it cannot execute this statement [insert into history (itemid,clock,ns,value) values (29874,1551853981,821258439,3.000000);



 Comments   
Comment by Aleksejs Petrovs [ 2019 Mar 18 ]

Hello da-ishi,

Are you sure that DNS name is also changed on the moment of failover?

In the log, it looks like it has the wrong DNS and is pointing on the previous IP.

In the setups with the active/passive node, it's better to rely on the virtual-IP(vIP), not the DNS.

Zabbix is built to work with a single Database instance, not multiple and establishes the persistent connections to the database.

Regards,
Aleksejs!

Comment by da-ishi [ 2019 Mar 19 ]

Hello Aleksejs,

The DB (AWS Aurora) that I use is that DNS is fixed, and IP is replaced with active / passive node.
Also, the IP address is automatically assigned by DB (AWS Aurora), and VIP does not exist.
In other words, DNS can not be changed and IP can not be specified.

>Zabbix is built to work with a single Database instance, not multiple and establishes the persistent connections to the database.
Does this mean that there is no setting for not caching DNS?

Comment by Arturs Lontons [ 2019 Mar 21 ]

Hi,

Like Aleksejs said, unfortunately, in your current set-up the DNS will be unreliable without a server restart. Your best bet is to use the community resources such as the community forum or our IRC channel to discuss possible workarounds. You can also create a feature request describing the requested changes in Zabbix behavior.

Since this cannot be classified as a bug report, we will be closing this issue.

Comment by Chris Kistner [ 2019 Nov 04 ]

Hi,

I've had this " --read-only option so it cannot execute this statement" issue quite a few times with the AWS Aurora MySQL RDS instance when it does a failover and then Zabbix server still retains the connection to the old writer node. My Zabbix server never recovered from this unless I manually intervened.

Since yesterday I've now started using ProxySQL 2.0.7 (in a Docker container on the same host as my Zabbix server 4.4.1) and it handles Aurora failovers quite well now.
The setup via Docker was pretty quick, but the documentation online wasn't that easy to follow.

The other cool thing about the ProxySQL setup is that you can have your read-only queries sent to the reader endpoints and the write/update queries to the writer node.

If you need assistance with this, I'll a full tutorial on the forums...

Generated at Wed Apr 30 06:39:23 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.