问题描述
我在CNAME后面有一个弹性搜索服务,当我尝试使用curl命令通过命令行访问它时,我可以通过HTTP 200 OK响应获得正确的响应。
但是,当我尝试使用Java API的Rest High Level Client连接到服务时,出现403错误。
我的弹性搜索的访问策略配置为*作为AWS Principal。
错误日志如下:
[DEBUG] org.elasticsearch.client.RestClient: request [POST http://ES_ENDPOINT/INDEX_NAME/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true] returned [HTTP/1.1 403 Forbidden]
{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."}
这背后的可能原因是什么? 此问题仅发生在CNAME上,而不是实际的弹性搜索域名。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)