Caused by: ElasticsearchStatusException[Elasticsearch exception [type=cluster_block_exception, re...

java.lang.RuntimeException: ElasticsearchStatusException[Elasticsearch exception [type=cluster_block_exception, reason=index [zxtwebvisitoralllog] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]]
    at com.xxx.microservice.logstash.dao.BaseElasticDao.insertOrUpdateOne(BaseElasticDao.java:195)
    at com.xxx.microservice.logstash.task.SyncMySQLTask.save(SyncMySQLTask.java:215)
    at com.xxx.microservice.logstash.task.SyncMySQLTask.processingToday(SyncMySQLTask.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: ElasticsearchStatusException[Elasticsearch exception [type=cluster_block_exception, reason=index [zxtwebvisitoralllog] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]]
    at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)
    at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1727)
    at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1704)
    at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1467)
    at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1424)
    at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1394)
    at org.elasticsearch.client.RestHighLevelClient.index(RestHighLe^C

解决方法:

curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/zxtwebvisitoralllog/_settings -d '{"index.blocks.read_only_allow_delete": null}'

你可能感兴趣的:(Caused by: ElasticsearchStatusException[Elasticsearch exception [type=cluster_block_exception, re...)