You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# curl -ku'admin:xxx' -H'Content-Type: application/json' -X PRI https://10.0.0.1:9205/_cat/indices
curl: (52) Empty reply from server
使用异常 Method 通过网关请求集群
# curl -ku'admin:xxx' -H'Content-Type: application/json' -X PRI http://10.0.0.1:8002/_cat/indices
{"error":true,"message":"the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection"}
同时网关会输出节点不可用的日志
[01-16 13:39:15] [INF] [actions.go:46] node [10.0.0.1:9206] is not available
当异常的请求足够多,所有的节点都被认为不可用时,网关会输出集群不可用的日志
[01-16 13:39:15] [INF] [actions.go:345] es_cluster_test has active hosts: 0
[01-16 13:39:15] [INF] [actions.go:354] elasticsearch [es_cluster_test] is not available
在网关输出集群不可用日志后,正常的请求也会失败。
# curl -u'admin:xxx' -H'Content-Type: application/json' -X GET http://localhost:8002/_cat/indices
{"error":true,"message":"Elasticsearch [es_cluster_test] Service Unavailable"}
当网关输出集群可用的日志后,正常的请求才会成功。
[01-16 13:58:34] [INF] [actions.go:377] elasticsearch [es_cluster_test] is available
# curl -u'admin:xxx' -H'Content-Type: application/json' -X GET http://localhost:8002/_cat/indices
green open .security CyFkDI31Rj-Q5ybreWit3Q 1 2 8 0 114.8kb 38.2kb
The text was updated successfully, but these errors were encountered:
Problem description
通过网关访问集群,当请求返回结果为空时,网关会认为节点不可用
场景
集群配置跨域
默认允许的 Method 有:OPTIONS,HEAD,GET,POST,PUT,DELETE。
使用异常 Method 直接请求集群
使用异常 Method 通过网关请求集群
同时网关会输出节点不可用的日志
当异常的请求足够多,所有的节点都被认为不可用时,网关会输出集群不可用的日志
在网关输出集群不可用日志后,正常的请求也会失败。
当网关输出集群可用的日志后,正常的请求才会成功。
The text was updated successfully, but these errors were encountered: