kubernetes - 服务器关闭了流而不发送预告片
问题描述
我正在尝试使用 gRPC for Kubernetes(Amazon EKS)从 Envoy 与 Envoy 进行通信。
我的边车中有一个特使,我正在使用 grpcurl 来验证请求。请求投递到应用容器,没有报错,但是控制台返回如下结果
server closed the stream without sending trailers
我不知道上述问题的原因是什么,这个结果可能是什么原因?当我在与特使连接之前点击单个服务时,我能够确认响应恢复正常。
这是我的特使配置
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 10000
static_resources:
listeners:
- name: listener_secure_grpc
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 8443
traffic_direction: INBOUND
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
codec_type: auto
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: service_grpc
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: cluster_grpc
max_stream_duration:
grpc_timeout_header_max: 30s
tracing: {}
http_filters:
- name: envoy.filters.http.health_check
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck"
pass_through_mode: false
headers:
- name: ":path"
exact_match: "/healthz"
- name: envoy.filters.http.router
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/ssl/grpc/tls.crt
private_key:
filename: /etc/ssl/grpc/tls.key
- name: listener_stats
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 10001
traffic_direction: INBOUND
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
codec_type: AUTO
stat_prefix: ingress_http
route_config:
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: /stats
route:
cluster: cluster_admin
http_filters:
- name: envoy.filters.http.router
- name: listener_healthcheck
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 10010
traffic_direction: INBOUND
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
codec_type: AUTO
stat_prefix: ingress_http
route_config: {}
http_filters:
- name: envoy.filters.http.health_check
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck"
pass_through_mode: false
headers:
- name: ":path"
exact_match: "/healthz"
- name: envoy.filters.http.router
clusters:
- name: cluster_grpc
connect_timeout: 1s
type: STATIC
http2_protocol_options: {}
upstream_connection_options:
tcp_keepalive: {}
load_assignment:
cluster_name: cluster_grpc
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 1443
- name: cluster_admin
connect_timeout: 1s
type: STATIC
load_assignment:
cluster_name: cluster_grpc
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 10000
PS 2021.03.19
这是我发现的其他内容。当我从入口主机请求时,我得到了上述失败,但是当我从服务请求时,我得到了正常响应!
解决方案
推荐阅读
- python - 如何使用 Python 在没有 GCS 中的路由的情况下获取子文件夹中的文件名?
- java - 如何通过 JMX 在 WebSphere Liberty 中创建数据源
- python - Python中3D势场的平滑/插值
- python - 如何检查python中的xml标记值是否为none
- sql - 如果缺少表而不是抛出“无效的对象名称”错误,如何强制 SQL 语句执行不同的选择?
- r - Dplyr 对分组中的值进行计算,将每个项目与组中的所有 _other_ 项目进行比较
- monit - monit 文件系统检查可以处理 NTFS 磁盘吗?
- c# - 为什么带有串行端口重叠 I/O 的 C# PInvoke 有时会给我全零
- bootstrap-4 - 如何在引导程序中对齐标签?
- c# - 创建多个 HTTP 持久连接