[root@chisato.lyco.reco ~]# systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-10-30 19:06:41 JST; 1 day 1h ago
Docs: https://www.elastic.co
Process: 983 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 983 (code=exited, status=1/FAILURE)
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:637)
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:928)
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java>
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/java.lang.Thread.run(Thread.java:1589)
10月 30 19:06:41 chisato.lyco.reco systemd-entrypoint[983]: at java.base/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:186)
10月 30 19:06:41 chisato.lyco.reco systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
10月 30 19:06:41 chisato.lyco.reco systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
10月 30 19:06:41 chisato.lyco.reco systemd[1]: Failed to start Elasticsearch.
→ この後、
systemctl restart elasticsearch.service
を行っても起動しません。この事象を解決したときのメモです。
原因調査
cat /var/log/elasticsearch/elasticsearch.log
(中略)
java.lang.IllegalArgumentException: Plugin [analysis-icu] was built for Elasticsearch version 7.17.6 but version 7.17.7 is running
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'パスワード';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/ドメイン名/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/ドメイン名/privkey.pem
Your certificate will expire on 2023-01-09. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again. To non-interactively renew *all* of your
certificates, run "certbot renew"