Ad Widget

Collapse

Updated MariaDB server, Zabbix stops working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ojosaghae
    Junior Member
    • Dec 2022
    • 13

    #16
    I was trying to restore the backup, and this is what I got:
    Code:
    /home/ubuntu/mariadb-backup/mariadb# mariabackup --prepare --target-dir=/home/ubuntu/mariadb-backup/mariadb/
    mariabackup based on MariaDB server 10.6.12-MariaDB debian-linux-gnu (x86_64)
    [00] 2023-04-14 00:02:31 cd to /home/ubuntu/mariadb-backup/mariadb/
    [00] 2023-04-14 00:02:31 open files limit requested 0, set to 1024
    [00] 2023-04-14 00:02:31 This target seems to be not prepared yet.
    [00] 2023-04-14 00:02:31 mariabackup: using the following InnoDB configuration for recovery:
    [00] 2023-04-14 00:02:31 innodb_data_home_dir = .
    [00] 2023-04-14 00:02:31 innodb_data_file_path = ibdata1:12M:autoextend
    [00] 2023-04-14 00:02:31 innodb_log_group_home_dir = .
    [00] 2023-04-14 00:02:31 InnoDB: Using Linux native AIO
    [00] 2023-04-14 00:02:31 Starting InnoDB instance for recovery.
    [00] 2023-04-14 00:02:31 mariabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
    2023-04-14 0:02:31 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2023-04-14 0:02:31 0 [Note] InnoDB: Number of pools: 1
    2023-04-14 0:02:31 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
    2023-04-14 0:02:31 0 [Note] InnoDB: Using Linux native AIO
    2023-04-14 0:02:31 0 [Note] InnoDB: Initializing buffer pool, total size = 104857600, chunk size = 104857600
    2023-04-14 0:02:31 0 [Note] InnoDB: Completed initialization of buffer pool
    2023-04-14 0:02:31 0 [ERROR] InnoDB: Log file ./ib_logfile0 size 11305311 is not a multiple of 512 bytes
    2023-04-14 0:02:31 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
    [00] FATAL ERROR: 2023-04-14 00:02:31 mariabackup: innodb_init() returned 11 (Generic error).​
    Please advise me..

    Comment


    • ingrid@gearnoc.com.br
      [email protected] commented
      Editing a comment
      Anything after this error: [00] FATAL ERROR: 2023-04-14 00:02:31 mariabackup: innodb_init() returned 11 (Generic error).​ ?


      Try going to the next step of the recovery to see
  • ingrid@gearnoc.com.br
    Junior Member
    • May 2022
    • 13

    #17
    Yes, now you shoud try the restore. You can create a backup, but if something goes wrong its easier to purge and install again.

    Even if the services are not enabled you should be able to see the status.. make sure all the packages are reallt there... It's easier to install with: sudo apt-get install mariadb-server mariadb-client

    Comment

    • ojosaghae
      Junior Member
      • Dec 2022
      • 13

      #18
      Originally posted by [email protected]
      Yes, now you shoud try the restore. You can create a backup, but if something goes wrong its easier to purge and install again.

      Even if the services are not enabled you should be able to see the status.. make sure all the packages are reallt there... It's easier to install with: sudo apt-get install mariadb-server mariadb-client
      I did the restore and it worked. See below:
      Code:
      [01] 2023-04-14 06:46:27 Copying ib_logfile0 to /var/lib/mysql/ib_logfile0
      [01] 2023-04-14 06:46:27 ...done
      [01] 2023-04-14 06:46:27 Copying ibdata1 to /var/lib/mysql/./ibdata1
      [01] 2023-04-14 06:46:27 ...done
      [01] 2023-04-14 06:46:27 Copying ./aria_log.00000001 to /var/lib/mysql/aria_log.00000001
      [01] 2023-04-14 06:46:27 ...done
      [01] 2023-04-14 06:46:27 Copying ./zabbix/widget.ibd to /var/lib/mysql/zabbix/widget.ibd
      [01] 2023-04-14 06:46:27 ...done
      [01] 2023-04-14 06:46:27 Copying ./zabbix/report_param.ibd to /var/lib/mysql/zabbix/report_param.ibd
      [01] 2023-04-14 06:46:27 ...done
      [01] 2023-04-14 06:46:27 Copying ./zabbix/history.frm to /var/lib/mysql/zabbix/history.frm
      [01] 2023-04-14 06:46:27 ...done
      [01] 2023-04-14 06:46:27 Copying ./zabbix/correlation.ibd to /var/lib/mysql/zabbix/correlation.ibd
      [01] 2023-04-14 06:46:27 ...done​
      
      ....
      
      [01] 2023-04-14 06:46:35 Copying ./sys/x@0024user_summary_by_statement_latency.frm to /var/lib/mysql/sys/x@0024user_summary_by_statement_latency.frm
      [01] 2023-04-14 06:46:35 ...done
      [01] 2023-04-14 06:46:35 Copying ./sys/x@0024host_summary_by_statement_latency.frm to /var/lib/mysql/sys/x@0024host_summary_by_statement_latency.frm
      [01] 2023-04-14 06:46:35 ...done
      [01] 2023-04-14 06:46:35 Copying ./sys/x@0024waits_global_by_latency.frm to /var/lib/mysql/sys/x@0024waits_global_by_latency.frm
      [01] 2023-04-14 06:46:35 ...done
      [01] 2023-04-14 06:46:35 Copying ./sys/x@0024statements_with_sorting.frm to /var/lib/mysql/sys/x@0024statements_with_sorting.frm
      [01] 2023-04-14 06:46:35 ...done
      [00] 2023-04-14 06:46:35 completed OK!​
      Then I had to fix the file permissions by running
      Code:
      sudo chown -R mysql:mysql /var/lib/mysql
      and it executed ok.
      I ran sudo systemctl enable mariadb and it worked too.

      But when I ran
      Code:
      sudo systemctl start mariadb
      It returns the following error:

      Code:
       Job for mariadb.service failed because the control process exited with error code.
      See "systemctl status mariadb.service" and "journalctl -xe" for details.​
      on running systemctl status mariadb, I see the following:

      Code:
      systemctl status mariadb
      ● mariadb.service - MariaDB 10.6.12 database server
      Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
      └─migrated-from-my.cnf-settings.conf
      Active: failed (Result: exit-code) since Fri 2023-04-14 06:49:14 UTC; 11s ago
      Docs: man:mariadbd(8)
      https://mariadb.com/kb/en/library/systemd/
      Process: 21484 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
      Process: 21485 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
      Process: 21487 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exit>
      Process: 21516 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
      Main PID: 21516 (code=exited, status=1/FAILURE)
      Status: "MariaDB server is down"​
      Any help please? Thank you so much!

      Comment


      • ingrid@gearnoc.com.br
        [email protected] commented
        Editing a comment
        I am not a DBA, so trying to help as much as i can with my research...

        So aparantly this error means that mysql is still installed and so they both are trying to connect in the same port

        Try the --purge again, only for mysql and also try:

        apt-get autoremove mysql-server
        apt update
    Working...