Ad Widget

Collapse

Appliance not starting: Database error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Prokurator
    Junior Member
    • Jan 2023
    • 3

    #1

    Appliance not starting: Database error

    Hi All,
    I am new to Zabbix.
    Today I downloaded the 6.2 appliance and was thinking that it would be running from scratch, as expected from an appliance, but unfortunately not. Frontend says "Database error. connection refused".

    In server log stays:
    1277:20230117:204244.798 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
    1277:20230117:204244.798 database is down: reconnecting in 10 seconds


    MySQL service status:
    # systemctl status mysqld.service
    ● mysqld.service - MySQL 8.0 database server
    Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/mysqld.service.d
    └─override.conf
    Active: failed (Result: exit-code) since Tue 2023-01-17 20:29:14 CET; 16min ago
    Process: 1248 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS)
    Process: 1201 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=1/FAILURE)
    Process: 1157 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS)
    Process: 1089 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
    Main PID: 1201 (code=exited, status=1/FAILURE)
    Status: "Server shutdown complete"

    Jan 17 20:29:12 appliance systemd[1]: Starting MySQL 8.0 database server...
    Jan 17 20:29:12 appliance mysql-check-socket[1089]: Socket file /var/lib/mysql/mysql.sock exists.
    Jan 17 20:29:12 appliance mysql-check-socket[1089]: No process is using /var/lib/mysql/mysql.sock, which means it is a garbage, so it will be removed automatically.
    Jan 17 20:29:14 appliance systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
    Jan 17 20:29:14 appliance systemd[1]: mysqld.service: Failed with result 'exit-code'.
    Jan 17 20:29:14 appliance systemd[1]: Failed to start MySQL 8.0 database server.


    How can I get it running?
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    It looks like mysql server is failing to start. I tested the .ovf version today and it works OK. What flavor are you using?

    Comment

    • Prokurator
      Junior Member
      • Jan 2023
      • 3

      #3
      Originally posted by LenR
      It looks like mysql server is failing to start. I tested the .ovf version today and it works OK. What flavor are you using?
      I am using VMware (.vmx).
      If I start MySQL manually it fails:

      # systemctl start mysqld.service
      Job for mysqld.service failed because the control process exited with error code.
      See "systemctl status mysqld.service" and "journalctl -xe" for details.


      Status message is in the first post. Do you know how to get it started?
      Meanwhile, I will try the .ovf version.​

      Comment

      • Prokurator
        Junior Member
        • Jan 2023
        • 3

        #4
        The .ovf version is working from scratch. It seems to be something wrong with the VMware one.

        Comment

        • pyritejoe
          Junior Member
          • Aug 2022
          • 15

          #5
          I have had this issue a couple times and ended up doing a uninstall and reinstall of the mysql. Just backup the database folder, uninstall msql, remove the mysql folders, reinstall. Do the initial setup of mysql and then stop is and copy over the zabbix folder ytou backed up and start mysql trhen zabbix.

          Comment


          • mouataz
            mouataz commented
            Editing a comment
            Can you please share with me how to do this process ! my school-project stop because of this issue please
        • mouataz
          Junior Member
          • May 2024
          • 1

          #6
          Can you please share with me how to do this process ! my school-project stop because of this issue please

          Comment

          Working...