Creating a new database reflection job pulling data from PostgreSQL I am running into an error on saving the job even if testing the query is positive.
It says "
> blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
"
Googling for the error I understood that low disk space can cause this error. Indeed I freed 130 GB now but still get this error and my previously working reflection job also stops with the same issue.
How can I make the index working again? As a newbie I would need quite a detailed help.
THANK YOU!
Hi this error means that your elasticsearch went into read-only mode
This happens automatically if you do not have enough free space (less than 5%) on your drive
To fix this you can tell elasticsearch to make the indices writable again by
curl -k -u admin:password \
-H'Content-Type: application/json' \
-XPUT https://localhost:9220/_settings \
-d '
{
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}'
To prevent this from happening in the future you can add the following to elasticsearch.yml file
cluster.routing.allocation.disk.threshold_enabled: false
cluster.routing.allocation.disk.watermark.low: 3gb
cluster.routing.allocation.disk.watermark.high: 2gb
cluster.routing.allocation.disk.watermark.flood_stage: 1gb
Cheers
Simon
1 Like
Many thanks! I will try.
I thought ElasticSearch would come back OK after free disk space is available again.
Hi Simon!
This perfectly worked out!
At first I got an error curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
The solution was to use http
instead of https
.
Again, many thanks for the quick response and totally helpful advice.
1 Like