Logstash가 처음엔 실행되었다가 이후에 실행이 안됩니다

    ubuntu@ip-10-0-1-50:~$ sudo /usr/share/logstash/bin/logstash -f /etc/logstash/logstash.conf
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[WARN ] 2020-08-01 13:57:01.877 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[FATAL] 2020-08-01 13:57:01.895 [LogStash::Runner] runner - Logstash could not be started because there is already another instance using the configured data directory.  If you wish to run multiple instances, you must change the "path.data" setting.
[ERROR] 2020-08-01 13:57:01.898 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

이게 logstash를 시작하면 발생하는 오류입니다... 처음 logstash를 설치하고 위와 똑같은 명령어를 입력했을 때는 잘 실행되었습다. 그런데 시간이 지나고 다시 putty를 통해 우분투 환경에서 똑같이 입력하니 갑자기 실행되지 않습니다.
sudo systemctl start logstash를 하고 status를 확인해보면 잘 돌아가고 있는데요.. 제가 작성한 logstash.conf 파일을 제외하고는 아무것도 건들지 않았습니다...
제 생각에는 처음에 logstash를 통해서 받은 데이터가 이미 존재해서 발생하는 오류가 아닌가 싶기도 하네요.. path_data를 바꿔줘야 한다거나 기존 데이터를 삭제해야 된다거나 할 필요가 있을까요? 그렇다면
기존 데이터는 어디에 위치하는지 알 수 있을까요? (우분투에 deb package로 elk 다운받았습니다.)
의견 주시면 고맙겠습니다.

Logstash could not be started because there is already another instance using the configured data directory.

이미 실행중인 인스턴스가 있는것 같네요. ps -ef | grep logstash 로 실행중인 로그스태시 찾아 킬 하시고 다시 실행 해 보세요.
만약 로그스태시를 여러개 띄워야 하시면 path.data 를 다르게 하셔야 하는데, 그냥 각 로그스태시를 경로를 다르게 해서 압축을 풀어놓고 사용하시는게 편합니다.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.