-
Elasticsearch snapshot - AWS S3 에러개발 이야기/인프라 구축 및 운영 2021. 6. 17. 11:16728x90반응형
신규 노드를 추가하면서 elasticsearch에 repository-s3 plug-in 설치 하는걸 잊어 버렸더니 아래와 같은 에러가 발생하기 시작했습니다.
{ "snapshot" : { "snapshot" : "snapshot_name", "uuid" : "vQeYKiYaTaq0rOiGXbjQEQ", "version_id" : 7110099, "version" : "7.11.0", "indices" : [ "my_index" ], "data_streams" : [ ], "include_global_state" : true, "state" : "PARTIAL", "start_time" : "2021-06-09T05:57:10.373Z", "start_time_in_millis" : 1623218230373, "end_time" : "2021-06-09T05:57:10.574Z", "end_time_in_millis" : 1623218230574, "duration_in_millis" : 201, "failures" : [ { "index" : "my_index", "index_uuid" : "my_index", "shard_id" : 0, "reason" : "RepositoryMissingException[[s3_repo] missing]", "node_id" : "4uuGpijIS0-8wEE6_Aoj8g", "status" : "INTERNAL_SERVER_ERROR" } ], "shards" : { "total" : 1, "failed" : 1, "successful" : 0 } } }
에러는 RepositoryMissingException라고 나와서 저장소 정보가 잘못되었나 싶었는데 상태 확인해보면 멀쩡하게 나옵니다.
GET /_snapshot/s3_repo { "s3_repo" : { "type" : "s3", "settings" : { "bucket" : "es-snapshot", "client" : "default" } } }
아래와 같이 플러그인 추가하면 ...
bin/elasticsearch-plugin install repository-s3
그리고 S3 접근을 위한 설정값을 세팅해야 합니다. access_key와 secret_key 설정은 이 문서를 참고하세요.
이후 스냅샷이 성공합니다. 해당 노드에서 설치된 플러그인 리스트는 아래와 같이 확인 가능합니다.
bin/elasticsearch-plugin list
에러 메세지가 좀 더 알기 쉽게 나오면 좋을텐데 아쉽네요.
다른 분들은 저처럼 시간 낭비 안하시길 빕니다. 좋은 하루 되세요.
반응형'개발 이야기 > 인프라 구축 및 운영' 카테고리의 다른 글
Windows에서 jenkins + docker를 이용한 개발용 인프라 자동 구축 (0) 2022.03.04 EC2 인스턴스 관리를 위해 사전 작업들 (0) 2021.09.08 Elasticsearch snapshot - AWS S3 에러 (0) 2021.06.17 Metricbeat 설치 및 Kibana 연동 (0) 2021.05.27 linux 환경 변수 세팅하는 방법 (0) 2021.05.17 mariadb(mysql) 이중화 구성 (0) 2021.04.08 TAG