개발 이야기/인프라 구축 및 운영
Elasticsearch snapshot - AWS S3 에러
가온아
2021. 6. 17. 11:16
신규 노드를 추가하면서 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
에러 메세지가 좀 더 알기 쉽게 나오면 좋을텐데 아쉽네요.
다른 분들은 저처럼 시간 낭비 안하시길 빕니다. 좋은 하루 되세요.
반응형