这篇笔记比较老,不再更新维护,请移步最新的手册:envoy相关笔记。
如果envoy启动时获得的配置中,有端口冲突,会打印一条日志:
[2019-01-07 14:51:19.417][16000][critical][config] source/server/listener_manager_impl.cc:836] listener 'listener_with_dynamic_route_port_9001_repeat' failed to listen on address '0.0.0.0:9001' on worker
如果envoy动态获取的一个新的Listener与已有的Listener端口冲突,会不停的打印下面的日志:
[2019-01-07 14:53:30.086][16108][warning][config] bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:70] gRPC config for type.googleapis.com/envoy.api.v2.Listener rejected: Error adding/updating listener listener_with_dynamic_route_port_9001_repeat: cannot bind '0.0.0.0:9001': Address already in use
[2019-01-07 14:53:30.087][16108][warning][upstream] source/common/config/grpc_mux_impl.cc:226] gRPC config for type.googleapis.com/envoy.api.v2.Listener update rejected: Error adding/updating listener listener_with_dynamic_route_port_9001_repeat: cannot bind '0.0.0.0:9001': Address already in use
[2019-01-07 14:53:30.088][16108][warning][config] bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:70] gRPC config for type.googleapis.com/envoy.api.v2.Listener rejected: Error adding/updating listener listener_with_dynamic_route_port_9001_repeat: cannot bind '0.0.0.0:9001': Address already in use
listener := &api.Listener{
Name: "listener_with_dynamic_route_port_9002",
Address: core.Address{
Address: &core.Address_SocketAddress{
SocketAddress: &core.SocketAddress{
Protocol: core.TCP,
Address: "0.0.0.0",
PortSpecifier: &core.SocketAddress_PortValue{
PortValue: 9002,
},
},
},
},
FilterChains: []listener.FilterChain{
listener.FilterChain{
Filters: []listener.Filter{
listener.Filter{
Name: "envoy.http_connection_manager",
ConfigType: &listener.Filter_Config{
Config: listen_filter_http_conn,
},
},
listener.Filter{
Name: "envoy.http_connection_manager",
ConfigType: &listener.Filter_Config{
Config: listen_filter_http_conn,
},
},
},
},
},
}
如果vhost的名称相同会触发告警,并且在/config_dump中看不到域名重复的vhost:
[2019-01-07 15:08:14.004][16790][warning][upstream] source/common/config/grpc_mux_impl.cc:226] gRPC config for type.googleapis.com/envoy.api.v2.RouteConfiguration update rejected: Only unique values for domains are permitted. Duplicate entry of domain ads.webshell.com
[2019-01-07 15:08:14.004][16790][warning][config] bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:70] gRPC config for type.googleapis.com/envoy.api.v2.RouteConfiguration rejected: Only unique values for domains are permitted. Duplicate entry of domain ads.webshell.com