Currently, we try to switch from Zabbix 6.2 to 7.0-2 for our new clusters (i.e. those do not have Zabbix 6.2 preinstalled, but we install 7.0-2 directly). However, while 6.2 runs without any visible issues, 7.0-2’s server stops after start. I am primarily looking for ways to debug this problem further, but if someone has straight up a solution, I am all there fore it.
The log indicates that it is a dns issue:
# /var/log/zabbix/zabbix_server.log
thread started [discovery worker #4]
cannot initialize asynchronous DNS library
cannot initialize asynchronous DNS library
One child process died (PID:1650808,exitcode/signal:1). Exiting ...
HA manager has been paused
zabbix_server [1650753]: Error waiting for process with PID 1650808: [10] No child processes
HA manager has been stopped
syncing trend data...
syncing trend data done
Zabbix Server stopped. Zabbix 7.0.0 (revision 49955f1fb5c).
We do use dnsmasq but had no issues with Zabbix 6.2. Name resolution via dnsmasq works in general.
In order to install Zabbix we make use of an Ansible playbook:
- name: Add zabbix repositories
apt:
deb: "https://repo.zabbix.com/zabbix/7.0/{{ ansible_distribution | lower }}
/pool/main/z/zabbix-release/zabbix-release_7.0-2%2B{{ ansible_distribution | lower }}
{{ ansible_distribution_version }}_all.deb"
state: present
force: true
# -------------------
# -- Zabbix Server --
# -------------------
- name: Debian based OS (Install database & Zabbix server)
apt:
name:
- mariadb-server
- zabbix-server-mysql
- zabbix-sql-scripts
state: present
update_cache: true
- name: Install python modul 'PyMySQL'
pip:
name: PyMySQL
- name: Create zabbix database
mysql_db:
name: "{{ zabbix_conf.db }}"
encoding: 'utf8'
state: present
login_user: root
login_unix_socket: /run/mysqld/mysqld.sock
- name: Create zabbix database user
mysql_user:
name: "{{ zabbix_conf.db_user }}"
password: "{{ zabbix_conf.db_password }}"
priv: '{{ zabbix_conf.db }}.*:ALL'
login_user: root
login_unix_socket: /run/mysqld/mysqld.sock
- name: Check if zabbix schema exists
failed_when: false
shell: "echo describe users | mysql --user={{ zabbix_conf.db_user }} --password={{ zabbix_conf.db_password }} zabbix"
changed_when: false
register: zabbix_schema_exists
tags:
- skip_ansible_lint
- name: Import initial db schema
shell: "set -o pipefail && zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz |
mysql --user={{ zabbix_conf.db_user }} --password={{ zabbix_conf.db_password }} zabbix"
when: zabbix_schema_exists.rc == 1
args:
executable: bash
tags:
- skip_ansible_lint
- name: Update Admin password
mysql_query:
login_db: "{{ zabbix_conf.db }}"
login_user: "{{ zabbix_conf.db_user }}"
login_password: "{{ zabbix_conf.db_password }}"
query: update users set passwd='{{ zabbix_conf.admin_password | password_hash("bcrypt") }}' where username='Admin'
- name: Adjust zabbix server configuration
template:
src: zabbix/zabbix_server.conf.j2
dest: /etc/zabbix/zabbix_server.conf
mode: 0644
notify: zabbix-server
- name: Start and Enable zabbix-server
systemd:
name: zabbix-server
state: started
enabled: true
Additional
There are more tasks running (like setting up the zabbix-agent and a web view), but those are unrelated to the problem, I think.
I have omitted the tags Ansible and dnsmasq on this question for now, because narrowing down on the problem is probably just a zabbix question and I don’t want to discourage potential answerers by adding a tag they might be unfamiliar with.