Laravel5.3 使用 es 出现 missing authentication token for REST request,谁能帮忙解决

BadRequest400Exception in Connection.php line 614:
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/test_index/logs_index/_search?size=10000]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication token for REST request [/test_index/logs_index/_search?size=10000]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 3

大哥, 你这个问题觉解了没?我也遇见这个问题了, 认证信息不知道怎么加进去。难道要重写ElasticsearchEngine ?

5年前 评论

好吧,只要把host 修改一下即可 ELASTICSEARCH_HOST=http://user:password@URL:port
之前测试的时候可能是因为白名单等其他原因,请求失败, 以为这个方法不行。。。今天确认了OK的

5年前 评论
thinkphp_ 8个月前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!