Ad Widget

Collapse

Zabbix 7.0 fails/stops quickly after server start

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JustTheGuyNatan
    Junior Member
    • Sep 2022
    • 5

    #1

    Zabbix 7.0 fails/stops quickly after server start

    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:


    Code:
    # /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](https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html) 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](https://www.ansible.com/) playbook:


    Code:
    - 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.
    Last edited by JustTheGuyNatan; 15-07-2024, 11:33.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    https://support.zabbix.com/browse/ZBXNEXT-8620 says the DNS resolving was changed in 7.0. I have no idea how your Ansible setup handles including the required packages for the zabbix-server-mysql package, but on Debian 12 the normal install process results in working setup.

    Markku

    Comment

    • JustTheGuyNatan
      Junior Member
      • Sep 2022
      • 5

      #3
      Mhm,
      Ansible should just follow the normal install process. I will double check.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        https://support.zabbix.com/browse/ZBX-24532 ?? Even if it is about proxy startup there, server and proxy are very similar in build....
        Maybe you should try install 7.0.1 or 7.0.2 instead..? (Log snippet indicates 7.0.0 is installed)

        Comment

        Working...