Unable to save documents to Elasticsearch index
Unable to save documents to Elasticsearch index, getting the following error while saving
err: { Error: [cluster_block_exception] index [events] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
at respond (/Users/experimental/githome/foo/node_modules/elasticsearch/src/lib/transport.js:308:15)
at checkRespForFailure (/Users/experimental/githome/foo/node_modules/elasticsearch/src/lib/transport.js:267:7)
at HttpConnector.<anonymous> (/Users/experimental/githome/foo/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
at IncomingMessage.wrapper (/Users/experimental/githome/foo/node_modules/lodash/lodash.js:4949:19)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
status: 403,
displayName: 'AuthorizationException',
message:
'[cluster_block_exception] index [events] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];',
path: '/events/events',
query: {},
body:
'{"user":"foo"}',
statusCode: 403,
response:
'{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [events] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}],"type":"cluster_block_exception","reason":"index [events] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"},"status":403}',
toString: [Function],
toJSON: [Function] }
1 Answer
5 years ago by Karthik Divi
Run the following on ES
PUT events/_settings
{
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}
This should fix the problem, also cross-check your disk space. The reason could be low disk space.
5 years ago by Eleven