報錯1:
[FORBIDDEN/12/index read-only / allow delete (api)]
原因:
1.內存不足:JVMMemoryPressure 超過92%並持續30分鍾時,ES觸發保護機制,並且阻止寫入操作,以防止集群達到紅色狀態,啟用寫保護后,寫入操作將失敗,並且拋出 ClusterBlockException ,無法創建新索引,並且拋出 IndexCreateBlockException ,當五分鍾內恢復到88%以下時,將禁用寫保護
2.磁盤空間不足:es的默認磁盤水位警戒線是85%,一旦磁盤使用率超過85%,es不會再為該節點分配分片,es還有一個磁盤水位警戒線是90%,超過后,將嘗試將分片重定位到其他節點。
報錯1解決辦法:
開發者工具執行: PUT /_all/_settings { "index.blocks.read_only_allow_delete": null }
===========================================================================
報錯2:
message: "blocked by: [FORBIDDEN/8/index write (api)];: [cluster_block_exception] blocked by: [FORBIDDEN/8/index write (api)];"
原因:
在其他問題排錯時,設置了: PUT /_all/_settings { "index.blocks.write": true } 導致進群內索引不可寫,在創建索引模式時,瀏覽器調試模式可以看到報錯,es也可以看到報錯,kibana也可以看到報錯。
報錯2解決辦法:
開發者工具執行: PUT /_all/_settings { "index.blocks.write": null }
===========================================================================
報錯3:

Anoter kibana instance appears to be migrating the index, waiting for that migrating to complete. if no other kibana instance is attempting migrating ,you can get leting index .kibana_1 and restarting kibana 另一個kibana實例似乎正在遷移索引,等待遷移完成。如果沒有其他kibana實例正在嘗試遷移,則可以刪除index.kibana_1並重新啟動kibana
原因:
本以為是紅框下面的報錯導致的問題,一直在查下面的報錯,一直沒有找到解決辦法,后來翻譯了一下這句話,原來是這個索引的鍋。
報錯3解決辦法:
刪除索引:
命令行:curl -u elastic:password -XDELETE http://es_ip:9200/.kibana_1
開發工具執行:DELETE .kibana_1
重啟kibana,它會重新生成新的索引.kibana_1
