Ad Widget

Collapse

Aborted connection 4 to db: 'zabbix' user: 'zabbix' host: 'localhost'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dackhang96
    Junior Member
    • Jul 2024
    • 7

    #1

    Aborted connection 4 to db: 'zabbix' user: 'zabbix' host: 'localhost'

    Hi, I installed Zabbix-server 6.0 on CentOS Stream 9 with MariaDB 10.5 and I get the following error when starting zabbix-server:
    I also had a problem with zabbix when I changed the MariaDB path from /var/lib/mysql to /home/lib/mysql. The mariadb service still runs fine, however when I restart zabbix-server it fails. If I go back to the original MariaDB path it works fine.
    Does anyone have any solution?
    This is my.cnf config file:

    [mysqld]
    datadir=/home/lib/mysql
    socket=/home/lib/mysql/mysql.sock
    bind-address = localhost
    innodb_force_recovery = 3
    key_buffer_size=128M
    read_buffer_size=128M
    read_rnd_buffer_size=256M
    innodb_log_buffer_size=256M
    innodb_buffer_pool_size=1G
    query_cache_type=2
    max_allowed_packet=1G
    max_connections=1500
    net_read_timeout=3600
    net_write_timeout=3600
    net_buffer_length=1000000
    thread_cache_size=256
    log_error = /var/log/mariadb/error.log
    general_log_file = /var/log/mariadb/mysql.log
    [client]
    port=3306
    socket=/home/lib/mysql/mysql.sock
    [mysqldump]
    max_allowed_packet=1024M
    #
    [client-server]

    And
    /etc/my.cnf.d/mariadb-server.cnf

    [mysqld]
    datadir=/home/lib/mysql
    socket=/home/lib/mysql/mysql.sock
    log-error=/var/log/mariadb/mariadb.log
    pid-file=/run/mariadb/mariadb.pid

    And
    /etc/zabbix/zabbix_server.conf

    Click image for larger version  Name:	image.png Views:	0 Size:	33.6 KB ID:	488825
    Click image for larger version  Name:	image.png Views:	0 Size:	285.0 KB ID:	488824
    Last edited by dackhang96; 01-08-2024, 12:01.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    If you want to use the local socket, try removing DBPort, it doesn't make sense.

    Markku

    Comment

    • dackhang96
      Junior Member
      • Jul 2024
      • 7

      #3
      Originally posted by Markku
      If you want to use the local socket, try removing DBPort, it doesn't make sense.

      Markku
      Hi Markku
      I did not use DBport and tried again, however it still did not fix it.

      Click image for larger version  Name:	image.png Views:	0 Size:	820.3 KB ID:	488840

      Error displayed on website
      Click image for larger version  Name:	image.png Views:	0 Size:	8.6 KB ID:	488839
      This is my mariadb status.

      Click image for larger version  Name:	image.png Views:	0 Size:	250.9 KB ID:	488838
      This is my Zabbix-Server status.
      Click image for larger version  Name:	image.png Views:	0 Size:	53.1 KB ID:	488841​​
      Last edited by dackhang96; 01-08-2024, 13:53.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1782

        #4
        About the error in the UI, how is your UI configured? That is different from zabbix_server.conf.

        Markku

        Comment

        • dackhang96
          Junior Member
          • Jul 2024
          • 7

          #5
          Originally posted by Markku
          About the error in the UI, how is your UI configured? That is different from zabbix_server.conf.

          Markku
          Hi Markku
          Are you talking about httpd right? i didn't configure anything

          Click image for larger version

Name:	image.png
Views:	781
Size:	75.0 KB
ID:	488974

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1782

            #6
            No, I'm talking about the Zabbix UI configuration, how does it try to reach the database.

            /etc/zabbix/web/zabbix.conf.php (at least in Debian)

            Markku

            Comment

            Working...