Getting error "Status Code: 404; Error Code: NoSuchKey" while registering Linode bucket as Elasticsearch snapshot repository
I am trying to register Linode object storage bucket as an Elasticsearch snapshot register.
Below are the steps i have performed
- Created linode bucket and created its access and secret key
- Installed the repository-s3 plugin
- Configured s3 client using below command
sudo /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.<client_name>.access_key
sudo /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.<client_name>.secret_key</client_name></client_name> - Restarted elasticsearch for changes to take effect
While running the below request for the registry
PUT _snapshot/wiki_snap_repo
{
"type": "s3",
"settings": {
"client": "wiki",
"bucket": "elastic-snapshot",
"compress": true,
"endpoint": "elastic-snapshot.in-maa-1.linodeobjects.com"
}
}
I am getting below error :
{
"error": {
"root_cause": [
{
"type": "amazon_s3_exception",
"reason": "null (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: tx000003269bff72fcd9967-0065a7acfa-797372-default; S3 Extended Request ID: 797372-default-default)"
}
],
"type": "amazon_s3_exception",
"reason": "null (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: tx000003269bff72fcd9967-0065a7acfa-797372-default; S3 Extended Request ID: 797372-default-default)"
},
"status": 500
}
Why is it giving me such error when linode bucket are s3 compatible ?
1 Reply
I found a third-party blog post about using Elasticsearch Snapshots with Linode Storage Object. Looking at the difference in their API call and yours, it looks like they include the access and secret keys in the settings.
Since the error seems to be about the access key, it makes sense to me that adding that would resolve the issue. You can visit the site to read more, but here's the example they shared:
PUT /_snapshot/my_linode_repository
{
"type": "s3",
"settings": {
"bucket": "snapshot-test",
"access_key": "<access_key>",
"secret_key": "<secret_key>",
"endpoint": "eu-central-1.linodeobjects.com",
"protocol": "http"
}
}