注意,以下问题是我本地Mac环境ES版本为7.1.1发生的
更新:2019-11-03
安装 kibana 的 sense 插件失败:
解决:我本地下载的是7.1.1 版本,网上说5.x版本已经有这个了。但是我用的是kibana(在官网下载),在Dev Tools中,效果好像也类似,而且可以提示命令
curl 带请求体的报如下错误
解决:
聚合查询错误
官往的案例是这样的:
GET /megacorp/employee/_search
{
"aggs": {
"all_interests": {
"terms": { "field": "interests" }
}
}
}
但会报400错误,加上keyword,解决如下:
GET /megacorp/employee/_search
{
"aggs": {
"all_interests": {
"terms": { "field": "interests。keyword" }
}
}
}
本地磁盘空间不足
如果本地磁盘空间不足,就会进入只读状态,官方解释
[error][task_manager] Failed to poll for work: [cluster_block_exception] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]; :: {“path”:”/.kibana_task_manager/_update/Maps-maps_telemetry”,”query”:{“if_seq_no”:27,”if_primary_term”:11,”refresh”:”true”},”body”:”{\”doc\”:{\”type\”:\”task\”,\”task\”:{\”taskType\”:\”maps_telemetry\”,\”state\”:\”{\\”runs\\”:1,\\”stats\\”:{\\”mapsTotalCount\\”:1,\\”timeCaptured\\”:\\”2019-11-02T06:37:29.600Z\\”,\\”attributesPerMap\\”:{\\”dataSourcesCount\\”:{\\”min\\”:4,\\”max\\”:4,\\”avg\\”:4},\\”layersCount\\”:{\\”min\\”:4,\\”max\\”:4,\\”avg\\”:4},\\”layerTypesCount\\”:{\\”TILE\\”:{\\”min\\”:1,\\”max\\”:1,\\”avg\\”:1},\\”VECTOR\\”:{\\”min\\”:3,\\”max\\”:3,\\”avg\\”:3}},\\”emsVectorLayersCount\\”:{\\”world_countries\\”:{\\”min\\”:1,\\”max\\”:1,\\”avg\\”:1}}}}}\”,\”params\”:\”{}\”,\”attempts\”:0,\”scheduledAt\”:\”2019-11-02T06:37:29.395Z\”,\”runAt\”:\”2019-11-03T10:25:49.843Z\”,\”status\”:\”running\”},\”kibana\”:{\”uuid\”:\”3da5c8d8-7d8e-40d9-9786-93511f2e46a2\”,\”version\”:7010199,\”apiVersion\”:1}}}”,”statusCode”:403,”response”:”{\”error\”:{\”root_cause\”:[{\”type\”:\”cluster_block_exception\”,\”reason\”:\”blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\”}],\”type\”:\”cluster_block_exception\”,\”reason\”:\”blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\”},\”status\”:403}”}
解决:重置索引只读:
PUT /{索引名称}/_settings { "index.blocks.read_only_allow_delete":null }