目录
1.现状
2.方法
1.现状
测试环境elasticsearch所在服务器,磁盘空间满了。导致elasticsearch的索引进入了只读模式,
按照先前的命令
curl -XPUT -H "Content-Type: application/json" http://10.XX.XX.XX:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
报如下错误
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/_all/_settings]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/_all/_settings]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}
这是因为先前处理elasticsearch未经授权漏洞时,开启了xpack认证。
2.方法执行命令时,需加上请求的用户,然后再输入密码
curl -XPUT -H "Content-Type: application/json" http://10.153.28.79:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}' -u elastic
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)