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}

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
讨论数量: 3

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

7年前 评论

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

7年前 评论
thinkphp_ 2年前

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