Ad Widget

Collapse

Database error - "No such file or directory" after move DB to external server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beriapl
    Junior Member
    • Jun 2020
    • 7

    #1

    Database error - "No such file or directory" after move DB to external server

    What I've done - was just a dump from local MySQL instance to external server.
    I've made changes in zabbix_server.conf to reflect database move to external server and it works - in zabbix server log I see that checks are going fine - it even sent me notifications via e-mail and teams.
    The problem seems to be only on the frontend.
    I've checked from zabbix server connection to database via command line - it works:

    Code:
    @zabbix7:~$ mysql -h 10.1.128.110 -u zabbix -p
    mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
    Enter password:
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 174330
    Server version: 11.7.2-MariaDB-ubu2404 mariadb.org binary distribution
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | zabbix             |
    +--------------------+
    2 rows in set (0.003 sec)
    
    MariaDB [(none)]> quit;
    Bye
    Code:
    zabbix7:~# zabbix_server -V
    zabbix_server (Zabbix) 7.2.4
    Revision c34078a4563 25 February 2025, compilation time: Feb 25 2025 07:46:29
    No errors on nginx.log
    No errors on php-fpm log

    Not sure what else I can check.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    The zabbix_server process and the front end are configured separately. It's a 3-tier architecture. In a large environment, you might run the database on server A, the zabbix_server process on server B, and the web front end on server C.

    The configuration for how the web front end talks to the database is in a PHP file, which should be called zabbix.conf.php . On my web install, it's in the 'conf' directory under the main zabbix web directory, but I'm not sure if the official packages place it in the same place. If you're using containers for the various components, the front-end DB config is probably set via environment variables, but I'm not certain (I'm not using containers for our Zabbix install).

    Comment

    • beriapl
      Junior Member
      • Jun 2020
      • 7

      #3
      Originally posted by tim.mooney
      The zabbix_server process and the front end are configured separately. It's a 3-tier architecture. In a large environment, you might run the database on server A, the zabbix_server process on server B, and the web front end on server C.

      The configuration for how the web front end talks to the database is in a PHP file, which should be called zabbix.conf.php . On my web install, it's in the 'conf' directory under the main zabbix web directory, but I'm not sure if the official packages place it in the same place. If you're using containers for the various components, the front-end DB config is probably set via environment variables, but I'm not certain (I'm not using containers for our Zabbix install).
      Yup, I've figured it out, DB definition for frontend is in PHP file located under "UI" directory.

      Thanks for response.

      Comment

      Working...