• 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    미해결

ghost 실습 데이터베이스 에러

24.04.18 23:02 작성 조회수 37

0

db image를 mariadb로 변경했음에도 아래와 같은 에러가 발생합니다..

Attaching to ghost-db-1, ghost-ghost-1

ghost-db-1 | 2024-04-18 13:58:19+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.7.8+maria~ubu2004 started.

ghost-ghost-1 | find: '/var/lib/ghost/content/themes/source': No such file or directory

ghost-ghost-1 | find: '/var/lib/ghost/content/themes/casper': No such file or directory

ghost-ghost-1 | chown: cannot access '/var/lib/ghost/content/themes/source': No such file or directory

ghost-ghost-1 | chown: cannot access '/var/lib/ghost/content/themes/casper': No such file or directory

ghost-ghost-1 exited with code 1

ghost-db-1 | 2024-04-18 13:58:19+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

ghost-db-1 | 2024-04-18 13:58:19+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.7.8+maria~ubu2004 started.

ghost-db-1 | 2024-04-18 13:58:19+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required

ghost-db-1 | 2024-04-18 13:58:19+00:00 [Note] [Entrypoint]: MariaDB upgrade (mariadb-upgrade) required, but skipped due to $MARIADB_AUTO_UPGRADE setting

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] Starting MariaDB 10.7.8-MariaDB-1:10.7.8+maria~ubu2004 source revision bc656c4fa54c12ceabd857e8ae134f8979d82944 as process 1

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Number of transaction pools: 1

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Using Linux native AIO

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Completed initialization of buffer pool

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] InnoDB: MySQL-8.0 tablespace in ./ibdata1

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] InnoDB: Restart in MySQL for migration/recovery.

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] InnoDB: Plugin initialization aborted with error Unsupported

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] InnoDB: Starting shutdown...

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] Plugin 'InnoDB' init function returned error.

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

ghost-db-1 | 2024-04-18 13:58:19 0 [Note] Plugin 'FEEDBACK' is disabled.

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] Unknown/unsupported storage engine: InnoDB

ghost-db-1 | 2024-04-18 13:58:19 0 [ERROR] Aborting

docker-compose.yml 내용은 아래와 같습니다.
version: '3' services: ghost: image: ghost ports: - "60000:2368" volumes: - ./ghost_data:/var/lib/ghost/content environment: database__client: mysql database__connection__host: db database__connection__user: root database__connection__password: example database__connection__database: ghost db: image: mariadb:10.7 environment: MYSQL_ROOT_PASSWORD: example


mysql(mariadb 10.9)에 접속해서 ghost 데이터베이스를 생성해도 에러가 발생합니다..

답변 1

답변을 작성해보세요.

0

인프런 AI 인턴님의 프로필

인프런 AI 인턴

2024.04.20

안녕하세요, 인프런 AI 인턴입니다.

제공해주신 정보와 오류 메시지를 바탕으로, 마리아DB 컨테이너와 관련된 문제는 마리아DB 이미지가 이전 버전의 MySQL 데이터베이스 파일로 인해 발생하는 오류로 보입니다. 특히 InnoDB: MySQL-8.0 tablespace in ./ibdata1와 같은 메시지는 마리아DB가 기존의 MySQL 8.0 데이터 파일을 올바르게 인식하지 못하는 것을 나타냅니다. 이 문제를 해결하는 한 가지 방법은 데이터베이스 컨테이너의 볼륨 데이터를 초기화하는 것입니다. 하지만 이 작업은 저장된 모든 데이터를 잃게 될 수 있으므로 주의해야 합니다.

그리고 Ghost 서비스 오류는 /var/lib/ghost/content/themes 디렉터리가 없거나 volumes 설정이 잘못된 경우 발생할 수 있습니다. docker-compose.yml 설정에서 볼륨을 ./ghost_data:/var/lib/ghost/content로 마운트했는데, 이 ./ghost_data 경로에 Ghost가 필요로 하는 초기 디렉토리와 파일이 제대로 구성되어 있는지 확인해보셔야 합니다.

도커 컴포즈 파일과 에러 메시지에 기반한 개선 조치로,

  1. 데이터베이스 볼륨을 초기화하거나 새로운 볼륨으로 시도해보세요. 데이터 손실 위험이 있으므로 중요한 데이터는 백업하세요.
  2. ./ghost_data 디렉토리를 확인하고 필요한 경우 Ghost의 초기 구조와 파일을 그 곳에 복사하세요.

이 조치들로 문제가 해결되지 않는다면, MariaDB 컨테이너의 로깅 레벨을 조정하여 보다 상세한 오류 메시지를 확인하거나 Ghost 커뮤니티 및 Docker 커뮤니티에 더 자세한 지원을 요청하는 것도 고려해 볼 수 있습니다.