🔖

ArchivematicaをDockerで起動する

2024/06/19に公開

概要

Archivematicaの起動にあたっては、Dockerを用いる方法が簡単でした。以下にインストール方法が記載されています。

https://github.com/artefactual/archivematica/tree/qa/1.x/hack

手順通りに進めるとうまくインストールできましたが、失敗した点について備忘録として記載します。

Elasticsearch container

Elasticsearchのコンテナ起動にあたり、vm.max_map_countを設定するように指示されています。

https://github.com/artefactual/archivematica/tree/qa/1.x/hack#elasticsearch-container

この設定を忘れると、以下のように、Elasticsearchコンテナが起動しませんでした。

docker compose up
[+] Running 10/0
 ✔ Container am-mysql-1                          Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-archivematica-storage-service-1  Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-nginx-1                          Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-clamavd-1                        Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-elasticsearch-1                  Created                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-fits-1                           Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-gearmand-1                       Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-archivematica-mcp-client-1       Running                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-archivematica-dashboard-1        Created                                                                                                                                                                                                                                                                               0.0s 
 ✔ Container am-archivematica-mcp-server-1       Running                                                                                                                                                                                                                                                                               0.0s 
Attaching to archivematica-dashboard-1, archivematica-mcp-client-1, archivematica-mcp-server-1, archivematica-storage-service-1, clamavd-1, elasticsearch-1, fits-1, gearmand-1, mysql-1, nginx-1
elasticsearch-1                  | [2024-06-18T02:16:40,373][INFO ][o.e.e.NodeEnvironment    ] [am-node] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/root)]], net usable_space [11.4gb], net total_space [48.2gb], types [ext4]
elasticsearch-1                  | [2024-06-18T02:16:40,379][INFO ][o.e.e.NodeEnvironment    ] [am-node] heap size [512mb], compressed ordinary object pointers [true]
elasticsearch-1                  | [2024-06-18T02:16:40,433][INFO ][o.e.n.Node               ] [am-node] node name [am-node], node ID [SomtTY5CTF-SfYe3gLBpOw]
elasticsearch-1                  | [2024-06-18T02:16:40,433][INFO ][o.e.n.Node               ] [am-node] version[6.8.23], pid[1], build[default/docker/4f67856/2022-01-06T21:30:50.087716Z], OS[Linux/6.5.0-1018-aws/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/15.0.1/15.0.1+9]
elasticsearch-1                  | [2024-06-18T02:16:40,434][INFO ][o.e.n.Node               ] [am-node] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.io.tmpdir=/tmp/elasticsearch-7162129985120281509, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.cgroups.hierarchy.override=/, -Xms512m, -Xmx512m, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker]
elasticsearch-1                  | [2024-06-18T02:16:42,896][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [aggs-matrix-stats]
elasticsearch-1                  | [2024-06-18T02:16:42,897][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [analysis-common]
elasticsearch-1                  | [2024-06-18T02:16:42,897][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [ingest-common]
elasticsearch-1                  | [2024-06-18T02:16:42,898][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [ingest-geoip]
elasticsearch-1                  | [2024-06-18T02:16:42,898][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [ingest-user-agent]
elasticsearch-1                  | [2024-06-18T02:16:42,898][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [lang-expression]
elasticsearch-1                  | [2024-06-18T02:16:42,898][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [lang-mustache]
elasticsearch-1                  | [2024-06-18T02:16:42,899][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [lang-painless]
elasticsearch-1                  | [2024-06-18T02:16:42,899][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [mapper-extras]
elasticsearch-1                  | [2024-06-18T02:16:42,899][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [parent-join]
elasticsearch-1                  | [2024-06-18T02:16:42,900][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [percolator]
elasticsearch-1                  | [2024-06-18T02:16:42,900][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [rank-eval]
elasticsearch-1                  | [2024-06-18T02:16:42,900][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [reindex]
elasticsearch-1                  | [2024-06-18T02:16:42,900][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [repository-url]
elasticsearch-1                  | [2024-06-18T02:16:42,901][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [transport-netty4]
elasticsearch-1                  | [2024-06-18T02:16:42,901][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [tribe]
elasticsearch-1                  | [2024-06-18T02:16:42,902][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-ccr]
elasticsearch-1                  | [2024-06-18T02:16:42,903][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-core]
elasticsearch-1                  | [2024-06-18T02:16:42,903][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-deprecation]
elasticsearch-1                  | [2024-06-18T02:16:42,904][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-graph]
elasticsearch-1                  | [2024-06-18T02:16:42,904][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-ilm]
elasticsearch-1                  | [2024-06-18T02:16:42,904][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-logstash]
elasticsearch-1                  | [2024-06-18T02:16:42,905][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-ml]
elasticsearch-1                  | [2024-06-18T02:16:42,905][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-monitoring]
elasticsearch-1                  | [2024-06-18T02:16:42,905][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-rollup]
elasticsearch-1                  | [2024-06-18T02:16:42,905][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-security]
elasticsearch-1                  | [2024-06-18T02:16:42,906][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-sql]
elasticsearch-1                  | [2024-06-18T02:16:42,906][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-upgrade]
elasticsearch-1                  | [2024-06-18T02:16:42,906][INFO ][o.e.p.PluginsService     ] [am-node] loaded module [x-pack-watcher]
elasticsearch-1                  | [2024-06-18T02:16:42,907][INFO ][o.e.p.PluginsService     ] [am-node] no plugins loaded
elasticsearch-1                  | [2024-06-18T02:16:47,324][INFO ][o.e.x.s.a.s.FileRolesStore] [am-node] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]
elasticsearch-1                  | [2024-06-18T02:16:48,172][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [am-node] [controller/96] [Main.cc@114] controller (64 bit): Version 6.8.23 (Build 31256deab94add) Copyright (c) 2022 Elasticsearch BV
elasticsearch-1                  | [2024-06-18T02:16:48,944][INFO ][o.e.d.DiscoveryModule    ] [am-node] using discovery type [zen] and host providers [settings]
elasticsearch-1                  | [2024-06-18T02:16:50,009][INFO ][o.e.n.Node               ] [am-node] initialized
elasticsearch-1                  | [2024-06-18T02:16:50,010][INFO ][o.e.n.Node               ] [am-node] starting ...
elasticsearch-1                  | [2024-06-18T02:16:50,139][INFO ][o.e.t.TransportService   ] [am-node] publish_address {172.23.0.3:9300}, bound_addresses {0.0.0.0:9300}
elasticsearch-1                  | [2024-06-18T02:16:50,190][INFO ][o.e.b.BootstrapChecks    ] [am-node] bound or publishing to a non-loopback address, enforcing bootstrap checks
elasticsearch-1                  | ERROR: [1] bootstrap checks failed
elasticsearch-1                  | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch-1                  | [2024-06-18T02:16:50,238][INFO ][o.e.n.Node               ] [am-node] stopping ...
elasticsearch-1                  | [2024-06-18T02:16:50,253][INFO ][o.e.n.Node               ] [am-node] stopped
elasticsearch-1                  | [2024-06-18T02:16:50,254][INFO ][o.e.n.Node               ] [am-node] closing ...
elasticsearch-1                  | [2024-06-18T02:16:50,265][INFO ][o.e.n.Node               ] [am-node] closed
elasticsearch-1                  | [2024-06-18T02:16:50,268][INFO ][o.e.x.m.p.NativeController] [am-node] Native controller process has stopped - no new native processes can be started
dependency failed to start: container am-elasticsearch-1 exited (78)

まとめ

Dockerによる起動については、開発者のために設計されていると記載されており、プロダクション環境での使用には注意が必要ですが、Archivematicaの使用にあたり、参考になりましたら幸いです。

Discussion