gpt4 book ai didi

macos - 特使 - 断言失败 : interface_index == 0

转载 作者:行者123 更新时间:2023-12-04 12:29:30 29 4
gpt4 key购买 nike

尝试使用 envoy --bootstrap-version 2 -c ./config.yaml 运行 envoy 时出现错误
Envoy 版本:1.17.1 安装了 homebrew
操作系统:macOS Big Sur 版本:11.2.3 (20D91)
错误:

[2021-04-01 22:57:39.064][105033][info][main] [source/server/server.cc:731] starting main dispatch loop
[2021-04-01 22:57:44.024][105033][critical][assert] [source/common/network/apple_dns_impl.cc:304] assert failure: interface_index == 0. Details: unexpected interface_index=4294967295
[2021-04-01 22:57:44.025][105033][critical][backtrace] [bazel-out/darwin-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:104] Caught Abort trap: 6, suspect faulting address 0x7fff205dc462
[2021-04-01 22:57:44.025][105033][critical][backtrace] [bazel-out/darwin-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:91] Backtrace (use tools/stack_decode.py to get line numbers):
[2021-04-01 22:57:44.025][105033][critical][backtrace] [bazel-out/darwin-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:92] Envoy version: d6a4496e712d7a2335b26e2f76210d5904002c26/1.17.1/Modified/DEBUG/BoringSSL
配置文件
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 8080
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
'@type': "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"
stat_prefix: http_proxy
route_config:
name: all
virtual_hosts:
- name: allbackend_cluster
domains:
- '*'
routes:
- match: { prefix: "/"}
route:
cluster: allbackend_cluster
http_filters:
- name: envoy.filters.http.router
clusters:
- name: allbackend_cluster
connect_timeout: 1s
type: strict_dns
lb_policy: round_robin
load_assignment:
cluster_name: allbackend_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: localhost
port_value: 1111

- endpoint:
address:
socket_address:
address: localhost
port_value: 2222

- endpoint:
address:
socket_address:
address: localhost
port_value: 3333

- endpoint:
address:
socket_address:
address: localhost
port_value: 4444
我认为这与配置文件本身或 --bootstrap-version 2 无关。 ,因为我尝试过的所有配置文件都遇到了类似的问题。

最佳答案

原来问题出在配置上,特别是主机名。 MacOS 上的 Envoy 在解析 DNS 时遇到问题,因此无法确定 localhost172.0.0.1 .如果您在配置文件中用 IP 地址替换主机名,则此错误将得到解决。
或者,您可以添加此

layered_runtime:
layers:
- name: disable_apple_dns
static_layer:
envoy.restart_features.use_apple_api_for_dns_lookups: false
进入您的特使配置文件,这将禁用用于 DNS 查找的 Apple API,也将解决问题。

关于macos - 特使 - 断言失败 : interface_index == 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66910297/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com