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}

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 3

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

5年前 评论

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

5年前 评论
thinkphp_ 7个月前

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