我目前正在尝试设置特使接受一个https请求,并将该请求作为http请求传递给一个单独运行(通过Docker)的本地端点(特使也在本地运行)。不幸的是,当我通过Postman发出请求时,我得到了以下错误:“上游连接错误或在Headers.Reset reason: connection failure之前断开/重置”。对如何解决这个问题有什么想法吗?
我使用的envoy.yaml文件如下所示:
# envoy
static_resources:
listeners:
- name: "listener"
address: { socket_address: { address: 0.0.0.0, port_value: 8443 } }
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_https
http_filters: { name: envoy.filters.http.router }
route_config:
name: route
virtual_hosts:
- name: host
domains: ["*"]
routes:
- match: { prefix: "/" }
route:
cluster: cluster
timeout: 10s
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
common_tls_context:
tls_certificates:
- certificate_chain: { filename: "/etc/envoy/cert.crt" }
private_key: { filename: "/etc/envoy/cert.key" }
alpn_protocols: "h2,http/1.1"
clusters:
- name: cluster
connect_timeout: 20s
type: strict_dns
lb_policy: least_request
health_checks:
timeout: 5s
interval: 2s
unhealthy_threshold: 3
healthy_threshold: 1
http_health_check: { path: "/healthcheck" }
circuit_breakers:
thresholds:
max_retries: 300
load_assignment:
cluster_name: cluster
endpoints:
- lb_endpoints:
- endpoint: { address: { socket_address: { address: "0.0.0.0", port_value: 8080 } } }如果还需要什么,请让我知道。提前感谢您的帮助/提示!
发布于 2020-08-14 02:28:51
请增加群集connect_timeout,然后重试。也许这样就能解决问题了。
https://stackoverflow.com/questions/62987895
复制相似问题