lxcのトラブルが解決したので、各コンテナのアップグレードが順調に終了。サービスの起動を確認していたら、Zabbixサーバが起動していない。ログを確認すると、DBへの接続に失敗しているみたい。
841:20251122:060826.806 current database version (mandatory/optional): 06050110/06050110
841:20251122:060826.806 required mandatory version: 07000000
841:20251122:060826.806 mandatory patches were found
841:20251122:060826.809 starting automatic database upgrade
841:20251122:060826.811 [Z3005] query failed: [1449] The user specified as a definer ('zabbix'@'localhost') does not exist [update items set timeout='' where type not in (19,21)]
841:20251122:060826.811 database upgrade failed on patch 06050111, exiting in 10 seconds'zabbix'@'localhost' のユーザが設定されていないと言っているみたいだけど、DBサーバはZabbixのサーバとは別ホストになっているので、そもそもlocalhostは使っていないんだけどなぁ。DBサーバ側のログも確認してみると、Abort connection のエラー表示が延々と、、
2025-11-22 16:11:13 1799 [Warning] Aborted connection 1799 to db: 'zabbix' user: 'zabbix' host: 'zbx01' (Got an error reading communication packets)
2025-11-22 16:11:34 1801 [Warning] Aborted connection 1801 to db: 'zabbix' user: 'zabbix' host: 'zbx01' (Got an error reading communication packets)
2025-11-22 16:11:54 1802 [Warning] Aborted connection 1802 to db: 'zabbix' user: 'zabbix' host: 'zbx01' (Got an error reading communication packets)どうにも原因がわからないので、とりあえずログに出ているユーザをDB上に作成してみる、
mysql> create user 'zabbix'@'localhost' identified by '<password>';
mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost'すると、DB接続のretryで接続に成功し、サーバの起動を確認。動くようになったのはいいけど、何が原因だかさっぱり不明
コメント