Region or endpoint option is required for cleaning up S3 repository – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.4-7.17

Briefly, this error occurs when Elasticsearch is trying to clean up an S3 repository, but the region or endpoint is not specified. Elasticsearch needs these details to locate the S3 bucket. To resolve this issue, you can either specify the region or endpoint in the Elasticsearch configuration file or provide it as a parameter in the API call. Another way is to set the region or endpoint as an environment variable. Make sure the specified region or endpoint matches with the one where your S3 bucket is located.

This guide will help you check for common problems that cause the log ” region or endpoint option is required for cleaning up S3 repository ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repository.

Log Context

Log “region or endpoint option is required for cleaning up S3 repository” class name is CleanupS3RepositoryCommand.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 String region = regionOption.value(options);
 String endpoint = endpointOption.value(options);  if (Strings.isNullOrEmpty(region) && Strings.isNullOrEmpty(endpoint)) {
 throw new ElasticsearchException("region or endpoint option is required for cleaning up S3 repository");
 }  if (Strings.isNullOrEmpty(region) == false && Strings.isNullOrEmpty(endpoint) == false) {
 throw new ElasticsearchException("you must not specify both region and endpoint");
 }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?