aws ec2 인스턴스(ubuntu)에서 elasticsearch를 실행하려고 합니다. 다음 명령을 실행했지만 다시 시작하지 못했습니다.
root@ip-XXX-XX-XX-XXX:/usr/lib/systemd/system# sudo service elasticsearch start
Job for elasticsearch.service failed because the control process exited with error code.
See "systemctl status elasticsearch.service" and "journalctl -xeu elasticsearch.service" for details.
이 작업을 수행 하면 systemctl status elasticsearch.service
아래 출력이 반환됩니다.
root@ip-XXX-XX-XX-XXX:/usr/lib/systemd/system# systemctl status elasticsearch
× elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-08-15 23:21:15 UTC; 3min 18s ago
Docs: https://www.elastic.co
Process: 16934 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=217/USER)
Main PID: 16934 (code=exited, status=217/USER)
CPU: 1ms
Aug 15 23:21:15 ip-172-31-24-173 systemd[1]: Starting Elasticsearch...
Aug 15 23:21:15 ip-172-31-24-173 systemd[16934]: elasticsearch.service: Failed to determine user credentials: No such process
Aug 15 23:21:15 ip-172-31-24-173 systemd[16934]: elasticsearch.service: Failed at step USER spawning /usr/share/elasticsearch/bin/systemd-entrypoint: No such process
Aug 15 23:21:15 ip-172-31-24-173 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=217/USER
Aug 15 23:21:15 ip-172-31-24-173 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Aug 15 23:21:15 ip-172-31-24-173 systemd[1]: Failed to start Elasticsearch.
내 Elasticsearch 시스템 구성은 다음과 같습니다
root@ip-172-31-24-173:/usr/lib/systemd/system# more elasticsearch.service
[Unit]
Description=Elasticsearch
Documentation=https://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
RuntimeDirectory=elasticsearch
PrivateTmp=true
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch
Environment=PID_DIR=/var/run/elasticsearch
Environment=ES_SD_NOTIFY=true
EnvironmentFile=-/etc/sysconfig/elasticsearch
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch
Group=elasticsearch
ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet
# StandardOutput is configured to redirect to journalctl since
# some error messages may be logged in standard output before
# elasticsearch logging system is initialized. Elasticsearch
# stores its logs in /var/log/elasticsearch and does not use
# journalctl by default. If you also want to enable journalctl
# logging, you can simply remove the "quiet" option from ExecStart.
StandardOutput=journal
StandardError=inherit
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65535
# Specifies the maximum number of processes
LimitNPROC=4096
# Specifies the maximum size of virtual memory
LimitAS=infinity
# Specifies the maximum file size
LimitFSIZE=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM
# Send the signal only to the JVM rather than its control group
KillMode=process
# Java process is never killed
SendSIGKILL=no
# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
# Allow a slow startup before the systemd notifier module kicks in to extend the timeout
TimeoutStartSec=75
[Install]
WantedBy=multi-user.target
# Built for packages-7.13.2 (packages)
나는 언급 한 것과 똑같은 단계를 따랐습니다.https://www.elastic.co/blog/running-elasticsearch-on-aws내가 뭔가 잘못하고 있는지 잘 모르겠습니다. 누구든지 팁을 제공할 수 있습니까?