Errors Launching MariaDB on Lightsale

0

Hello,

I recently launched a new Lightsale instance and the first thing I wanted to do is launch MariaDB. I ran the below command, which I found in AWS help docs:

sudo /opt/bitnami/mariadb/bin/mysqld_safe --defaults-file=/opt/bitnami/mariadb/conf/my.cnf --init-file=/tmp/mysql-init 2> /dev/null &

But the process dies almost immediately. Here is the associated errors from mysqld.log:

220914 16:02:15 mysqld_safe Starting mariadbd daemon with databases from /opt/bitnami/mariadb/data 2022-09-14 16:02:15 0 [Note] /opt/bitnami/mariadb/sbin/mariadbd (server 10.6.7-MariaDB) starting as process 17091 ... 2022-09-14 16:02:15 0 [ERROR] mariadbd: Can't lock aria control file '/opt/bitna mi/mariadb/data/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds 2022-09-14 16:02:45 0 [ERROR] mariadbd: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/opt/bitnami/mariadb/data/aria_log_control' 2022-09-14 16:02:45 0 [ERROR] Plugin 'Aria' init function returned error. 2022-09-14 16:02:45 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. 2022-09-14 16:02:45 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2022-09-14 16:02:45 0 [Note] InnoDB: Number of pools: 1 2022-09-14 16:02:45 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2022-09-14 16:02:45 0 [Note] InnoDB: Using Linux native AIO 2022-09-14 16:02:45 0 [Note] InnoDB: Initializing buffer pool, total size = 16777216, chunk size = 16777216 2022-09-14 16:02:45 0 [Note] InnoDB: Completed initialization of buffer pool 2022-09-14 16:02:45 0 [Note] InnoDB: 128 rollback segments are active. 2022-09-14 16:02:45 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2022-09-14 16:02:45 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2022-09-14 16:02:45 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2022-09-14 16:02:45 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2022-09-14 16:02:45 0 [Note] InnoDB: 10.6.7 started; log sequence number 42437; transaction id 14 2022-09-14 16:02:45 0 [Note] Plugin 'FEEDBACK' is disabled. 2022-09-14 16:02:45 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins may be not loaded 2022-09-14 16:02:45 0 [ERROR] Failed to initialize plugins. 2022-09-14 16:02:45 0 [ERROR] Aborting 220914 16:02:45 mysqld_safe mysqld from pid file /opt/bitnami/mariadb/tmp/mysqld.pid ended

The my.cnf is pretty basic:

[mysqladmin] user=

[mysqld] skip_name_resolve explicit_defaults_for_timestamp basedir=/opt/bitnami/mariadb port=3306 tmpdir=/opt/bitnami/mariadb/tmp socket=/opt/bitnami/mariadb/tmp/mysql.sock pid_file=/opt/bitnami/mariadb/tmp/mysqld.pid max_allowed_packet=16M bind_address=127.0.0.1 log_error=/opt/bitnami/mariadb/logs/mysqld.log slow_query_log=0 slow_query_log_file=/opt/bitnami/mariadb/logs/mysqld.log long_query_time=10.0 character_set_server=utf8 collation_server=utf8_general_ci plugin_dir=/opt/bitnami/mariadb/lib/plugin

[client] port=3306 socket=/opt/bitnami/mariadb/tmp/mysql.sock pid_file=/opt/bitnami/mariadb/tmp/mysqld.pid !include /opt/bitnami/mariadb/conf/bitnami/my_custom.cnf !include /opt/bitnami/mariadb/conf/bitnami/memory.conf

I have made no changes to anything, other than creating /tmp/mysql.init as described on another AWS kb article, but all that does is change the root password for MariaDB. Can anyone help me figure this out?

Gary
질문됨 2년 전1220회 조회
1개 답변
1

Hello,

It appears to be an issue with multiple processes attempting to access the /opt/bitnami/mariadb/data/aria_log_control file. I would recommend restarting the instance.

You could execute the following command to see which processes are trying to access this Aria file.

lsof '/opt/bitnami/mariadb/data/aria_log_control'

If after the restart and the validation that the aria_log_control file are not being accessed, you may need to adjust the permissions of the MariaDB service to allow full ownership of the /opt/bitnami/mariadb directory.

You can adjust the permissions by running:

chown -R mariadb:mariadb /opt/bitnami/mariadb
profile pictureAWS
전문가
Chris_G
답변함 2년 전
  • Thank you. It was a permissions issue. Now that's fixed, I have new errors, which are well beyond my knowledge.

    2022-09-14 21:15:39 0 [Note] /opt/bitnami/mariadb/sbin/mariadbd (server 10.6.7-MariaDB) starting as process 1746 ... 2022-09-14 21:15:39 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2022-09-14 21:15:39 0 [Note] InnoDB: Number of pools: 1 2022-09-14 21:15:39 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2022-09-14 21:15:39 0 [Note] InnoDB: Using Linux native AIO 2022-09-14 21:15:39 0 [Note] InnoDB: Initializing buffer pool, total size = 16777216, chunk size = 16777216 2022-09-14 21:15:39 0 [Note] InnoDB: Completed initialization of buffer pool 2022-09-14 21:15:39 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=42365,42365 2022-09-14 21:15:39 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 42365 between the checkpoint 42365 and the end 42449. 2022-09-14 21:15:39 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2022-09-14 21:15:39 0 [Note] InnoDB: Starting shutdown... 2022-09-14 21:15:39 0 [ERROR] Plugin 'InnoDB' init function returned error. 2022-09-14 21:15:39 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2022-09-14 21:15:39 0 [Note] Plugin 'FEEDBACK' is disabled. 2022-09-14 21:15:39 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2022-09-14 21:15:39 0 [ERROR] Aborting 220914 21:15:39 mysqld_safe mysqld from pid file /opt/bitnami/mariadb/tmp/mysqld.pid ended

    Further help is greatly apprecia

  • If your MariaDB instance was potentially writing transactions while it was being turned off, I would avoid doing the following, but if it wasn't, then this should fix your problem: rm -rf /opt/bitnami/mariadb/data/ib_logfile*. This will fix the Missing FILE_CHECKPOINT error you're seeing. The downside is if this is a heavily used MariaDB server, when the service was turned off, some transaction data may have been stored in these files (transactions waiting to be executed/stored). If this is is a low or unused MariaDB instance, no issues :)

  • Also I can't remember if the ib_logfile0, 1, etc files are stored in /opt/bitnami/mariadb or /opt/bitnami/mariadb/data. So best check before running that command

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠