1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Db2 Community Edition Docker Compose

1
Posted at

Db2 Community Edition Docker 再実行時のエラー回避メモ

問題

Db2 Community Edition Docker の再起動時に DBI20187E ファイルオーナーエラーが発生し起動できない。

ERROR: DBI20187E  The fencedid file "/database/config/db2inst1/sqllib/adm/fencedid" is invalid because it is not owned by the "root":"db2iadm1". Change the ownership of the fencedid file to be owned by the "root":"db2iadm1" and then rerun the command.
ERROR: An error occurred while configuring the instance "db2inst1".

参考

回避方法

コンテナ起動時に chown root:db2iadm1 /database/config/db2inst1/sqllib/adm/fencedid コマンドを実行してファイルオーナーを変更する。

環境

  • Windows 11
  • Rancher Desktop

Docker Compose

compose.yaml
services:
  db2:
    image: icr.io/db2_community/db2:11.5.9.0
    container_name: db2-11
    privileged: true
    restart: always
    ports:
      - "50000:50000"
    env_file:
      - ./env_list
    volumes:
      - ./db2data:/database
    command: bash -c "chown root:db2iadm1 /database/config/db2inst1/sqllib/adm/fencedid"
env_list
LICENSE=accept
DB2INSTANCE=db2inst1
DB2INST1_PASSWORD=password

DBNAME=USERDB
BLU=false
ENABLE_ORACLE_COMPATIBILITY=false
UPDATEAVAIL=NO
TO_CREATE_SAMPLEDB=false
REPODB=false
IS_OSXFS=false
PERSISTENT_HOME=true
HADR_ENABLED=false
ETCD_ENDPOINT=
ETCD_USERNAME=
ETCD_PASSWORD=

env_list 参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?