跳转到内容

错误信息

本页列出为 etemenanki-app 或 katana 编写配置时会遇到的错误:每条消息说了什么、由什么引起、应该改什么。内容按文件中出错的部分分组,你可以在页面中搜索终端里显示的文本。

本页的每条消息都是这两个程序打印的原文,通过对一些有问题的小文件运行 --test 采集而来。某条消息只会在启动或重载时出现的,页面中会注明。消息中的 <tag> 代表入站、出站或负载均衡器的 tag,<value> 代表你写的值,<path> 代表文件路径,<error> 代表底层错误的文本,<id> 代表 katana 节点的 api.node_id,<name> 代表 katana 重载日志行中使用的节点名(<panel>@<host>#<id>[/<type>],参见 katana 重载失败),<N> 代表秒数。… 表示省略的文本。其余内容都与打印出的原文完全一致。

两个程序都会在打开 socket 之前构建整个配置,并在遇到第一个错误时停止。修复它,再次运行 --test,重复这一过程直到文件通过检查。检查的顺序见命令行。

无论出现在哪里,消息本身都相同,只有前面的前缀不同。

场景 etemenanki-app 前缀 katana 前缀
--test configuration invalid: configuration error: ,节点检查的内容前面还有 node <id>:
启动 failed to start: failed to load config: (读取或解析);node <id>: (没有通过检查的节点,随后被跳过)
節點上線(僅 katana) node <id>: initial start failed: <error>; retrying in <N>s,其他重試原因也是同樣的形式,例如 katana 拒絕面板應答時的 node <id>: node_info failed: parse UniProxy config response: <error>; retrying in <N>s(參見節點啟動期間的重試)
輪詢執行中的節點(僅 katana) katana 拒絕面板應答時為 node <id>: node_info: parse UniProxy config response: <error>,能讀取卻無法建立時為 node <id>: cannot build the node, keeping the running one: <error>
重载 reload: <error>; keeping the running config、reload: cannot read <path>: <error>、reload refused, keeping the running config: … config reload failed, keeping current: 、reload: node <name>: <error>; keeping current config

无论出现在哪里,katana 还会在每个 TOML 错误前加上 config parse error: ,在编码错误前加上 config not utf-8: ,所以启动时你会看到 failed to load config: config parse error: …。

TOML 错误以出错的位置开头:

$ etemenanki-app --test -c config.toml
2026-09-25T03:57:12.004118Z ERROR etemenanki_app: configuration invalid: TOML parse error at line 8, column 1

请转到该行该列。TOML 语法与未知键列出了常见原因。

其他大多数消息都会指出它涉及的入站、出站、负载均衡器、用户或节点。路由错误会引用值或 tag,但不指出是哪条规则,因此请在文件中搜索它引用的值。以 building <what> failed: 开头的消息来自最后一个阶段,即像启动时那样构建配置的阶段。

构建任何东西之前,会先解析整个文件。每个表都会拒绝它不认识的键,所以拼写错误会让代理停止,而不是被忽略。

消息 含义 修复方法
TOML parse error at line <n>, column <m> 文件在该位置不是合法的 TOML,或者该处的键拼写错误、位于没有这个键的表中、是必填项却缺失([[inbound]] 和 [[outbound]] 中的 tag 或 protocol,[[route.rule]] 中的 outbound,[[balancer]] 中的 tag 或 outbounds)、出现了两次,或者值的类型不对,例如 port = "1080"、port = 70000 或 sniffing = "true"。 转到该行该列。检查键的拼写、它位于哪个表之下,以及值的类型。
invalid utf-8 sequence of <n> bytes from index <i> 文件不是 UTF-8 编码,例如保存成了 UTF-16 或旧式代码页。 把文件保存为 UTF-8。
No such file or directory (os error 2)、Is a directory (os error 21) 传给 -c 的路径不存在或是一个目录。 传入正确的路径。相对路径按工作目录解析。
config defines no outbounds 文件中没有 [[outbound]]、没有订阅文件,也没有引用 direct 或 blackhole 的路由。空文件就会以这种方式失败。 至少添加一个出站。第一个出站就是默认路由。

[inbound.settings] 和 [outbound.settings] 表在文件解析完成、协议已知之后才检查。因此它们的错误带有 tag,而不是行号。

消息 含义 修复方法
inbound <tag>: invalid settings: unknown field `<key>`, expected one of … settings 表中有该协议不接受的键。列表显示了接受的键。 更正或删除该键。各协议页面列出了所有键。
inbound <tag>: invalid settings: missing field `<key>` 缺少必填设置,例如 Trojan 用户的 password,或 SOCKS 账户的 user。 添加该键。
inbound <tag>: invalid settings: invalid type: … 某个设置的类型不对。 使用协议页面给出的类型。
outbound <tag>: invalid settings: … 出站的同样三种错误。 同上。

这些消息来自 [dns]。katana 自己的 [dns] 表会打印同样的消息,前面带有 node <id>: 。

消息 含义 修复方法
dns: unknown backend "<value>" (expected "system", "udp", "tls" or "https") backend 不是这四个名称之一。不接受 "doh" 和 "dot"。 DNS over HTTPS 使用 "https",DNS over TLS 使用 "tls"。
dns: the udp backend needs a server address(tls、https 同理) 除 system 外,每个后端都需要 server。 添加 server = "<ip>:<port>"。
dns: invalid server address: invalid socket address syntax server 不是带端口的 IP 地址。主机名或不带端口的 IP 会被拒绝。 写成 "192.0.2.53:53" 或 "[2001:db8::53]:853"。
dns: the tls backend needs a server name to verify against backend = "tls" 却没有 server_name。 添加解析器证书上的名称。
dns: the https backend needs the resolver's url backend = "https" 却没有 url。 添加 url,例如 "https://dns.example.com/dns-query"。
dns: "…" is not an https:// url url 不以 https:// 开头。 使用 https:// 形式。
dns: "…" has no usable host url 中没有主机,或者主机前面有用户名(user@)。 删除用户部分,保留主机。
dns: cannot read ca_file "<path>": <error> 无法读取 ca_file,例如 No such file or directory (os error 2)。 修正路径或权限。
building dns failed: no certificate in CA PEM bundle ca_file 中没有 PEM 证书。 让它指向至少包含一个 BEGIN CERTIFICATE 块的 PEM 文件。

这些消息来自 [inbound.stream]、[outbound.stream] 及其 tls、ws、grpc 和 reality 子表。前缀为 inbound <tag>: 或 outbound <tag>: ;最后检查的、把传输层与协议绑定的规则,在出站上打印为 outbound <tag>@v0: 。

前缀之后的消息 含义 修复方法
security = "tls" is not valid with network = "tcp"; use network = "tls" for TLS over plain TCP (security = "tls" layers TLS under network = "ws" or "grpc") 这是 Xray 对 TCP 上的 TLS 的写法。在这里,TCP 上的 TLS 是一种单独的 network。 把这两个键换成 network = "tls"。
unknown stream security "<value>" (expected "tls" or "none") security 不是 "tls"、"none" 或 "reality"。该值区分大小写,且不支持 "xtls"。 写成小写的 "tls" 或 "none",或在 VLESS 上写 "reality"。
security = "reality" needs network = "tcp" 在 tls、ws 或 grpc 下使用 REALITY。REALITY 直接运行在 TCP 上。 写 network = "tcp",或省略 network。
reality is for vless only 在 VLESS 以外的协议上设置了 security = "reality",入站和出站都一样。 改用 TLS,或改为提供 VLESS。
reality needs reality.private_key(入站还有 server_names、short_ids、dest (host:port),出站为 public_key)、reality.<key>: … 缺少某个 REALITY 设置,或者无法解码。 见 REALITY。
vless vision (xtls-rprx-vision) rides only over reality VLESS 入站或出站设置了 flow = "xtls-rprx-vision",却没有使用 security = "reality"。 使用 REALITY,或删除 flow。
anytls runs over tls only; its shape must be tls AnyTLS 入站或出站没有使用 network = "tls",或 AnyTLS 入站监听在 Unix socket 上。 写 network = "tls",并监听 IP 地址。
socks serves udp associate over plain tcp only; turn udp off to wrap it in a transport SOCKS 入站套在 TLS、WebSocket 或 gRPC 中,而 udp 保持开启(默认值)。 设置 udp = false。
unknown stream network "<value>" network 不是 tcp、tls、ws 或 grpc。不支持 "h2"、"http"、"quic" 和 "kcp"。 从这四个 network 中选一个。
grpc stream needs grpc.service_name network = "grpc" 却没有 [….stream.grpc] service_name。 添加服务名。两端必须一致。
protocol <name> does not support stream network "<value>" 该协议不使用传输层:Hysteria 2 和 TUN 入站,以及 freedom、blackhole、wireguard 和 hysteria2 出站。 删除 [….stream] 表。
protocol <name> does not support stream security "<value>" 同上,针对 security。 删除 [….stream] 表。
tls stream needs tls.cert_file 入站使用了 TLS(network = "tls",或在 ws、grpc 下设置了 security = "tls"),却没有证书。 在 [inbound.stream.tls] 下添加 cert_file。
tls stream needs tls.key_file 同上,针对私钥。 添加 key_file。
tls stream needs tls.server_name or server(ws+tls 和 grpc+tls 同理) 使用 TLS 的出站既没有 server_name 也没有 server 用来验证证书。 设置 server,或在 [outbound.stream.tls] 下设置 server_name。
ws stream needs ws.host or server WebSocket 出站没有用于 Host 头的主机。 设置 server、tls.server_name 或 ws.host。
grpc stream needs grpc.authority or server gRPC 出站没有 authority。 设置 server、tls.server_name 或 grpc.authority。
tls.allow_insecure and tls.ca_file cannot both be set 这两个键互相矛盾。 信任私有 CA 时保留 ca_file,跳过验证时保留 allow_insecure,不要同时设置。
cannot read tls.cert_file "<path>": <error>(或 tls.key_file) 无法读取该文件,例如 No such file or directory (os error 2) 或 Permission denied (os error 13)。 修正路径,或给服务用户读取权限。相对路径按工作目录解析。

能读取、但内容不对的文件会在构建配置时失败:

消息 含义 修复方法
building inbound <tag> failed: no certificate in PEM bundle cert_file 中没有 PEM 证书。 让它指向证书链,叶证书在前。
building outbound <tag>@v<n> failed: no certificate in CA PEM bundle 出站的 ca_file 中没有 PEM 证书。 让它指向 CA 证书。
building inbound <tag> failed: error:1E08010C:DECODER routines:…:No supported data to decode. Input type: PEM key_file 中没有 PEM 私钥。OpenSSL 的具体文本随其版本而不同。 让它指向未加密的 PEM 私钥。
building inbound <tag> failed: error:0A0000BE:SSL routines:SSL_CTX_check_private_key:no private key assigned:… 私钥与证书不匹配。 使用与该证书一同生成的私钥。

前缀为 inbound <tag>: 。

前缀之后的消息 含义 修复方法
port is required 监听 IP 地址的入站没有 port。 添加 port。
a unix socket listen has no port; remove port listen 以 / 开头,表示 Unix socket 路径,同时又设置了 port。 删除 port。
abstract unix sockets are not supported; use a filesystem path listen 以 @ 开头。 使用文件系统路径,例如 /run/etemenanki/http.sock。
hysteria2 listens on UDP and cannot use a unix socket Hysteria 2 入站的 listen 是一个路径。 给出 IP 地址和端口。
unix sockets are not served on windows 在 Windows 上 listen 写了路径,而 Windows 没有 Unix socket。 监听回环地址和端口。
socks over a unix socket has no local IP for UDP associate; set udp_bind or turn udp off Unix socket 上的 SOCKS 入站仍开启着 UDP(默认开启)。 设置 udp = false,或者把 udp_bind 设为本机的一个 IP 地址,其地址族与客户端发送数据报所用的地址一致,例如本地 IPv4 客户端用 127.0.0.1。此后每个客户端的 UDP ASSOCIATE 都必须写明其数据报来源的确切地址和端口。参见在 Unix socket 上监听。
protocol <name> over a unix socket does not support stream network "<value>" Unix socket 入站带有 [inbound.stream] 表。Unix socket 不承载传输层。 删除 [inbound.stream] 表。
<address> is bound by another inbound 两个入站的 listen 和 port 相同。hysteria2 入站绑定 UDP,因此可以与 TCP 入站使用同一个端口号。 修改其中一个。
tun owns a network interface and has no listener; remove listen/port TUN 入站设置了 listen 或 port。 两者都删除。
tun mtu must be at least 1280 TUN 的 mtu 低于 IPv6 的最小值。 使用 1280 或更大的值。
bad tun address "<value>": <error> address 中的某项不是 IP 地址(带或不带前缀长度)。 写成 "198.18.0.1/15" 或 "198.18.0.1"。
bad tun route "<value>": host part of address was not zero 某条路由设置了主机位,例如 "198.18.0.1/15"。 写成网络地址:"198.18.0.0/15"。

--test 不绑定任何东西,因此下列消息只会在启动时(failed to start: 之后)出现,或在重载时出现,此时整次重载都会被拒绝:

消息 含义 修复方法
inbound <tag>: binding <bind> failed: Address already in use (os error 98) 另一个程序占用了该端口。 释放端口或更换端口。
inbound <tag>: binding <bind> failed: Permission denied (os error 13) 端口低于 1024,但没有相应的权限。 授予 CAP_NET_BIND_SERVICE,或使用更高的端口。
inbound <tag>: binding <bind> failed: Cannot assign requested address (os error 99) listen 不是本机的地址。 使用本机拥有的地址,或 0.0.0.0。
inbound <tag>: binding unix:<path> failed: <path> exists and is not a socket Unix socket 路径被普通文件或目录占用。 删除该文件,或另选路径。
inbound <tag>: binding tun <name> failed: Operation not permitted (os error 1) 创建 TUN 设备需要 CAP_NET_ADMIN。未设置 name 时,tun <name> 显示为 tun auto。 以 CAP_NET_ADMIN 运行。参见 TUN。

<bind> 对 TCP 是 <host>:<port>,对 Hysteria 2 是 udp <host>:<port>,对 Unix socket 是 unix:<path>,对 TUN 是 tun <name>。

通过了 --test 的 SOCKS 入站,在客户端请求 UDP ASSOCIATE 时仍可能拒绝。此时入站以 SOCKS5 应答 0x02(connection not allowed by ruleset)回复,关闭控制连接,并在 debug 级别记录原因。这些日志行中的 <source> 在 TCP 上是客户端地址 Some(<ip>),在 Unix socket 上是 None。

日志行 含义 修复方法
socks connection from <source> ended: socks: UDP associate from an address family the relay is not bound in 中继永远收不到该客户端的数据报,所以入站直接拒绝这个关联,而不是让它悄无声息。IPv4 的 udp_bind,或者 ::ffff:192.0.2.10 这样的 IPv4 映射 IPv6 地址,只能收到 IPv4 客户端的数据报;:: 两者都能收到;其他 IPv6 的 udp_bind 只能收到 IPv6 客户端的数据报。例如 udp_bind = "127.0.0.1",而客户端通过 ::1 连接。在 Unix socket 上,地址族以客户端请求中写明的地址为准。 把 udp_bind 设为客户端连接所用的地址族,或者每个地址族各运行一个入站。
socks connection from None ended: socks: UDP associate over a unix socket must name its source address and port Unix socket 上的客户端发送的 UDP ASSOCIATE 中写的是零地址、零端口或域名。在 TCP 上,入站把关联绑定到控制连接的地址,但 Unix socket 没有这样的地址,只能依据请求本身。RFC 1928 允许客户端在不知道自己地址时发送零值,许多客户端都这样做,包括 etemenanki-app 自己的 SOCKS 出站。 让客户端写明它将用来发送数据报的确切地址和端口,或者设置 udp = false。参见 UDP ASSOCIATE。
消息 含义 修复方法
inbound <tag>: unknown protocol "<value>" 不是入站协议。入站协议有 socks、http、trojan、vless、vmess、shadowsocks、anytls、sss、hysteria2(也可写作 hysteria、hy2)和 tun。 更正名称。名称为小写。
outbound <tag>: unknown protocol "<value>" 不是出站协议。出站协议有 freedom(也可写作 direct)、blackhole(也可写作 block)、socks、http、trojan、vless、vmess、shadowsocks、anytls、sss、hysteria2(也可写作 hysteria、hy2)和 wireguard。 更正名称。
inbound <tag>: wireguard cannot be used as an inbound (no server implementation) WireGuard 只能作为出站。 只把 WireGuard 用作 [[outbound]]。
outbound <tag>: missing server 代理出站没有 server。 添加上游的主机名或 IP 地址。
outbound <tag>: invalid host "<host>": brackets hold only an IPv6 literal server 或 WireGuard 的 endpoint 的方括号里不是 IPv6 地址,或者方括号不成对。 IPv6 地址加不加方括号都可以,域名和 IPv4 地址不要加。
outbound <tag>: missing port 代理出站没有 port。 添加上游端口。
inbound <tag>: unknown socks auth "<value>" auth 不是 "none" 或 "password"。 使用其中之一。
inbound <tag>: users[<n>]: invalid uuid "…": <error> VLESS、VMess 或 sss 用户的 id 不是 UUID。 使用 36 个字符的形式,例如 11111111-2222-3333-4444-555555555555。
inbound <tag>: unknown vless flow "<value>"(outbound 同理) VLESS 的 flow 不是 xtls-rprx-vision。 使用 xtls-rprx-vision,或不写 flow。
outbound <tag>@v0: anytls password must not be empty AnyTLS 出站设置了 password = ""。 设置服务端给你的密码。
outbound <tag>: invalid uuid "…": <error> 出站的 id 有同样的问题。 同上。
outbound <tag>: unknown vmess security "<value>" VMess 出站的 security 不是 auto、aes-128-gcm 或 chacha20-poly1305(不区分大小写)。该值以小写显示。 使用这三者之一,或者省略它以使用 aes-128-gcm。
inbound <tag>: unknown shadowsocks method "<value>"(outbound 同理) 不是受支持的方法:aes-128-gcm、aes-256-gcm、chacha20-poly1305(也可写作 chacha20-ietf-poly1305)、xchacha20-poly1305(也可写作 xchacha20-ietf-poly1305),不区分大小写,或者 2022- 方法。不支持 rc4-md5 之类的流加密。 使用受支持的 AEAD 方法。
inbound <tag>: unknown shadowsocks-2022 method "<value>"(outbound 同理) 以 2022- 开头,但不是 2022-blake3-aes-128-gcm、2022-blake3-aes-256-gcm 或 2022-blake3-chacha20-poly1305。 更正名称。这三个名称区分大小写。
inbound <tag>: decode PSK: <error>(outbound 同理) Shadowsocks 2022 的密码不是标准 base64。 使用 base64 密钥,例如由 openssl rand -base64 32 生成的。
inbound <tag>: shadowsocks-2022: PSK too short (<n> < <len>)(outbound 同理) 解码后的密钥字节数少于该方法所需:2022-blake3-aes-128-gcm 需要 16 字节,其他两个需要 32 字节。 生成长度合适的密钥:openssl rand -base64 16 或 openssl rand -base64 32。
outbound <tag>: invalid address_family "<value>" 不是 auto、ipv4_only、ipv6_only、prefer_ipv4 或 prefer_ipv6。也接受 ipv4、v4、4 以及对应的 IPv6 写法,不区分大小写,并且可以用 - 代替 _。 使用上述取值之一。

Trojan、VLESS、VMess、Shadowsocks、AnyTLS 和 sss 用户以其 email 命名,Hysteria 2 用户以 user 命名。前缀为 inbound <tag>: 。

前缀之后的消息 含义 修复方法
users[<n>] has no email; a user of this inbound is named by its email Trojan、VLESS、VMess、Shadowsocks、AnyTLS 或 sss 入站的某个用户没有 email。 为每个用户设置 email。
users[<a>] and users[<b>] are both named "<name>" 两个用户的 email 相同。 给每个用户起一个唯一的名称。
users <a> and <b> present the same credential 两个用户的 UUID 或密码相同,入站无法区分他们。 给每个用户各自的凭据。
users <a> and <b> present the same username 两个 Hysteria 2 用户的 user 在忽略大小写后相同。 给他们不同的名称。
user <name>: a hysteria2 account needs a name without ':' and a password Hysteria 2 的 user 包含 :,而在线路上 : 用来分隔用户名和密码。 选一个不含冒号的名称。
消息 含义 修复方法
duplicate outbound tag <tag> 两个 [[outbound]] 段使用了相同的 tag。 重命名其中一个。
duplicate inbound tag <tag> 两个 [[inbound]] 段使用了相同的 tag。 重命名其中一个。
duplicate balancer tag <tag> 负载均衡器使用了某个出站或另一个负载均衡器已经在用的 tag。 给负载均衡器一个自己的 tag。
balancer <tag> references unknown outbound <member> outbounds 中的某个名称不是出站 tag。负载均衡器不能包含另一个负载均衡器。 更正成员 tag。
balancer <tag>: outbound <member> has no upstream a TCP health probe can reach 健康探测是对成员上游的 TCP 连接。freedom、blackhole 和 wireguard 成员没有这样的上游,hysteria2 成员只监听 UDP。 只对有 TCP 上游的代理出站做负载均衡。
balancer <tag>: unknown balancer strategy "<value>" (expected "failover" or "round_robin") strategy 是其他值。 使用 "failover"(默认)或 "round_robin"。
balancer <tag> has no members outbounds = []。 至少列出一个成员。

负载均衡解释了探测和各种策略。

路由错误不会指出是哪条规则。请在文件中搜索它引用的值。引用了不存在的入站的 inbound_tag 不算错误:那条规则永远不会匹配。

消息 含义 修复方法
route references unknown outbound <tag> 某条规则的 outbound 或 [route].default 没有指向任何出站或负载均衡器。路由引用 direct 和 blackhole 而没有出站使用这两个 tag 时,它们会被自动创建,因此永远不会这样失败。 更正 tag。
invalid cidr "<value>": host part of address was not zero cidr 或 source_cidr 中的某项设置了主机位,例如 "192.0.2.1/24"。 写成网络地址 "192.0.2.0/24",单个地址则写 "192.0.2.1/32"。
invalid cidr "<value>": invalid length for network: … 前缀长度过长,例如 IPv4 的 /33。 IPv4 使用 /0 到 /32,IPv6 使用 /0 到 /128。
invalid cidr "<value>": couldn't parse address in network: invalid IP address syntax 该项根本不是地址,例如是一个主机名。 使用 IP 网段。匹配域名请用域名匹配条件。
invalid rule network "<value>" (expected "tcp" or "udp") network 是列表或其他词,例如 "tcp,udp"。 使用 "tcp" 或 "udp",或者省略 network 以同时匹配两者。
invalid port spec: "<value>" port 中的某项不是数字或 low-high 范围。逗号分隔的列表(如 "80,443")和名称(如 "https")都会被拒绝。 每个端口或范围各写一项:port = ["80", "443", "8000-9000"]。不加引号的数字(port = [443])则是 TOML 错误。
invalid port spec: "<value>" has a lower bound above its upper bound 类似 "443-80" 的范围。 把下界写在前面。
invalid domain regex "<value>": regex parse error: 某个 domain_regex 项无法编译。 修正该模式,或改用 domain_suffix 或 domain_full。
building route failed: a geosite matcher is used but no geosite file is configured 有规则使用了 geosite,但没有设置 [route].geosite。 把 [route].geosite 设为 geosite.dat 的路径。
building route failed: a geoip matcher is used but no geoip file is configured 同上,针对 geoip。 设置 [route].geoip。
building route failed: No such file or directory (os error 2) 该路径下不存在 geodata 文件。 修正路径。只有当规则用到该文件时才会读取它。
building route failed: geosite code not found: <code> geosite.dat 中没有该列表名。Xray 的 geosite: 前缀不会被去掉,所以 "geosite:cn" 会这样失败。 写成不带前缀的名称,例如 "cn"。比较时不区分大小写。
building route failed: geoip code not found: <code> 同上,针对 geoip.dat,包括带 geoip: 前缀的情况。 写成不带前缀的代码,例如 "cn" 或 "!cn"。
building route failed: geosite decode: failed to decode Protobuf message: <error> geosite 文件不是 geosite .dat:文件被截断、是下载失败时得到的 HTML 错误页面,或者是 geoip 文件。 重新下载文件,并检查两个路径没有写反。
building route failed: geoip decode: failed to decode Protobuf message: <error> 同上,针对 geoip 文件。 同上。
building route failed: geoip cidr: bad ipv4 length(或 ipv6) geoip 文件能够解码,但规则用到的列表中有格式错误的网段。 替换 geoip 文件。

前缀为 outbound <tag>: ,表中注明处为 outbound <tag>@v0: 。

前缀之后的消息 含义 修复方法
invalid wireguard private_key 密钥不是 32 字节的 base64 或十六进制形式。 粘贴 wg genkey 的输出,或 wg-quick 文件中 PrivateKey 行的值。
invalid wireguard peer_public_key 对端公钥有同样的问题。 使用对端 [Peer] 段中的 PublicKey。
invalid wireguard preshared_key 预共享密钥有同样的问题。 使用 PresharedKey 的值,或者删除该键。
wireguard endpoint must be host:port endpoint 中没有 :,或者加方括号的 IPv6 地址后面没有 :port。 写成 "198.51.100.1:51820",IPv6 地址写成 "[2001:db8::1]:51820"。
invalid wireguard endpoint port 最后一个 : 之后的部分不是端口号。 更正端口。
invalid settings: missing field `address` address 是必填项。 添加隧道地址,例如 address = ["10.0.0.2"]。
invalid settings: invalid IP address syntax address 中的某项带有前缀长度,例如 "10.0.0.2/32"。该键只接受纯地址。 去掉 /32 或 /128。
invalid settings: invalid length <n>, expected an array of length 3 reserved 不是三个数字。 写三个字节,例如 reserved = [0, 0, 0],或者删除该键。
invalid endpoint_address_family "<value>" 不是 address_family 的取值之一。 使用 auto、ipv4_only、ipv6_only、prefer_ipv4 或 prefer_ipv6。
wireguard address_family ipv6_only needs an IPv6 address(或 ipv4_only … IPv4),前缀为 outbound <tag>@v0: address_family 只允许一个地址族,而 address 中没有该地址族的地址。 添加该地址族的地址,或修改 address_family。

WireGuard 列出了每个键对应的 wg-quick 字段。

消息 含义 修复方法
inbound <tag>: hysteria2 needs both cert_file and key_file [inbound.settings] 中缺少其中一个或两个。Hysteria 2 始终使用 TLS。 两个都设置。
inbound <tag>: cannot read cert_file "<path>": <error>(或 key_file) 无法读取该文件。 修正路径或权限。
building inbound <tag> failed: hysteria2: the certificate file contains no certificates cert_file 中没有 PEM 证书。 让它指向证书链。
building inbound <tag> failed: hysteria2: the key file contains no private key key_file 中没有 PEM 私钥。 让它指向私钥。
building inbound <tag> failed: hysteria2: could not read the certificate: <error> cert_file 中的 PEM 已损坏。 替换该文件。
building inbound <tag> failed: hysteria2: could not read the private key: <error> key_file 中的 PEM 已损坏。 替换该文件。
building inbound <tag> failed: hysteria2: certificate and key do not match: <error> 私钥与证书不匹配。 使用匹配的私钥。
inbound <tag>: a shared password and a user set cannot both be set; a credential would have two answers 同时配置了两种认证方式。 一个共享密码用 password,每个用户一项用 users,只保留一种。
inbound <tag>: hysteria2 needs a shared password or a user set 两者都没有设置。 设置其中一个。
inbound <tag>: the shared password must not be empty password = ""。 设置密码。
inbound <tag>: hysteria2: 233 is the authentication success status and cannot be used for the masquerade masquerade.status = 233。 使用其他状态码,例如默认的 404。
inbound <tag>: hysteria2: <n> is not an HTTP status code masquerade.status 不在 100 到 999 之间。 使用真实的状态码。
inbound <tag>: obfs_password is set but obfs is not; did you mean obfs = "salamander"? 设置了 obfs_password 却没有 obfs。 添加 obfs = "salamander",或删除 obfs_password。
inbound <tag>: salamander obfs key must be at least 4 bytes obfs = "salamander",但 obfs_password 过短或缺失。 使用更长的密码。
inbound <tag>: unknown obfs "<value>" (expected "salamander") obfs 是其他值。它区分大小写。 写成 "salamander"。
inbound <tag>: udp_idle_timeout must be between 2 and 600 seconds 取值超出范围。 使用 2 到 600,或省略以使用 60。
inbound <tag>: udp_idle_timeout is set but udp is not enabled 设置了 udp_idle_timeout 却没有 udp = true。 设置 udp = true,或删除该超时。
inbound <tag>: max_connections and max_circuits must be at least 1 其中一个限制为 0。 使用正数,或省略以使用默认值。
inbound <tag>: bandwidth.up: a bandwidth is a number and a unit, such as "100 mbps"(或 bandwidth.down) 速率只写了数字。 加上单位,例如 "100 mbps"。
inbound <tag>: bandwidth.up: unknown bandwidth unit "<value>"; use bps, kbps, mbps, gbps or tbps 速率的单位未知。 使用列出的单位之一。
inbound <tag>: unknown congestion "<value>" (expected "cubic", "bbr" or "reno") congestion 拼写错误或不是小写。 使用这三者之一。
inbound <tag>: quic.keep_alive_period is a client setting; a server does not ping [inbound.settings.quic] 中写了 keep_alive_period。 删除它。
inbound <tag>: quic.init_conn_receive_window is above quic.max_conn_receive_window(或 stream) 初始窗口大于最大窗口。 调小 init_ 的值,或删除它。
inbound <tag>: stream_receive_window must be at least 16384 bytes(或 conn_receive_window) 接收窗口小于 16384 字节。 使用 16384 或更大的值。
inbound <tag>: max_idle_timeout must be a whole number of seconds between 4 and 120 quic.max_idle_timeout 超出范围。 使用 4 到 120。
inbound <tag>: max_incoming_streams must be at least 1 quic.max_incoming_streams = 0。 使用正数,或省略以使用 65536。

用户相关的消息见用户。

Hysteria 2 记录了每个键。

订阅文件自身的错误以 subscribe: 开头,查找文件的两条除外。[api] 段的错误以 [api] 开头。

消息 含义 修复方法
[subscribe] needs a path naming the subscribe file [subscribe] 中没有 path。 添加服务商文件的路径。
subscribe file <path>: <error> 无法读取订阅文件,例如 No such file or directory (os error 2)。 把文件保存到该路径,或修正路径。
subscribe: TOML parse error at line <n>, column <m> 订阅文件无法解析。protocol 或 stream network 是当前版本不认识的值的节点也会在这里失败,并附带 unknown variant。 向服务商索取有效的文件,或修正该行。
subscribe: node "<name>": its protocol is not supported by this version(还有 its stream、its vmess security、its shadowsocks method) 该节点属于这个 etemenanki-app 无法转换为出站的类型。见格式版本。 向服务商索取你的客户端所读版本的文件。
subscribe: [subscribe.routes] names "<key>", which is not a route group in <file> 某个选择指向了文件中不存在的路由组,通常是服务商给它改了名。 重命名或删除这个选择。
subscribe: [subscribe.routes] "<key>" = "<tag>": no node, outbound or balancer has that name 某个选择没有指向任何东西:节点被重命名或删除,或者拼写错误。 选择一个存在的名称。
[api] secret is empty secret = ""。 设置一个足够长的随机 secret,或删除该键。
[api] listen <address>: an API reachable from other hosts needs a secret; listen on a loopback address or a unix socket, or set one API 在回环地址以外监听,却没有设置 secret。 在 127.0.0.1 或 Unix socket 上监听,或设置 secret。
failed to start: API on <listen>: <error> 启动时无法绑定 API 地址。进程退出。 释放该地址,或另选地址。
API on <listen>: <error>; it stays off until [api] changes 重载时无法绑定新的 API 地址。代理继续运行。 释放该地址,或修改 [api]。

文件格式的全部错误见订阅文件,API 的响应见 REST API。

文件发生变化时,etemenanki-app 会先检查并构建新配置,然后才动正在运行的配置。这些日志行来自 etemenanki_app::instance 日志 target,监视器相关的日志行除外,它们来自 etemenanki_app。

日志行 发生了什么 怎么办
reload: cannot read <path>: <error> 某个文件无法读取。正在运行的配置保持不变。 修正文件的路径或权限。
reload: <error>; keeping the running config 新文件无法解析或无法构建,或者新监听器无法绑定。<error> 可以是本页的任何消息。正在运行的配置保持不变。 排除原因后再次保存文件。
reload refused, keeping the running config: inbound <tag>: <reason>, which would end its live connections; restart to apply it 修改涉及 TUN 入站,或 Hysteria 2 入站的 obfs 或 obfs_password。正在运行的配置保持不变。 重启进程以应用修改。
config hot-reload disabled: <error> 启动时无法监视配置文件所在的目录。 检查该目录是否存在且可读,然后重启。
cannot watch <dir> for changes: <error> 无法监视配置中指定的某个目录,例如订阅文件所在的目录。 检查该目录是否存在且可读。

etemenanki-app 热重载解释了重载的过程。

katana 使用与 etemenanki-app 相同的内核,所以它的 DNS、路由和 Hysteria 2 消息往往与上文逐字相同。这一部分列出 katana 自己的消息以及与上文不同的地方。在 --test 和启动时,节点检查的所有内容都带有 node <id>: 前缀。

消息 含义 修复方法
config parse error: TOML parse error at line <n>, column <m> 檔案在該位置不是合法的 TOML,或者有未知的鍵或錯誤的型別。ApiHost 這樣的 XrayR 鍵名就會這樣失敗:katana 使用自己的 snake-case 名稱。katana 6 移除的 [node.api] vless_flow 和 disable_custom_config 也會這樣失敗(兩個設定項已移除)。原因與 TOML 語法與未知鍵中相同。 修正報告行上的鍵。鍵名對照見從 XrayR 遷移。
config not utf-8: invalid utf-8 sequence of <n> bytes from index <i> 文件不是 UTF-8 编码。 保存为 UTF-8。
No such file or directory (os error 2) 该路径下不存在配置文件。 修正路径。
config defines no [[node]] entries 文件中没有 [[node]]。空文件就会以这种方式失败。 添加一个节点。
node <id>: dns: … [dns] 无效。 参见 DNS 解析器:消息完全相同。

启动时,读取或解析错误记录为 failed to load config: <error>,并让 katana 以退出码 1 停止。节点错误记录为 node <id>: <error>,katana 跳过该节点并启动其他节点。一个节点都不剩时,它记录 no nodes could be started 并以退出码 1 退出。

消息 含义 修复方法
node <id>: unknown panel_type "<value>" panel_type 缺失,或者不是 NewV2board、V2board 或 Helium(不分大小寫)。該值以小寫顯示,所以缺少該鍵時顯示 ""。 使用這三者之一。Xboard 面板使用 NewV2board。參見 Xboard 與 V2board。
node <id>: panel_type "<value>" is not supported: katana serves the NewV2board and Helium panels panel_type 為 SSpanel(不分大小寫)。katana 6 不再服務 SSPanel,並按名稱指出它,而不是報告未知的值。該值按原寫法顯示。 改由 Xboard、V2board 或 helium 面板提供該節點,使用那個面板的節點 ID、金鑰和使用者,並相應修改 [[node]] 表。參見升級到 katana 6。
node <id>: unknown node_type "<value>" 在 NewV2board 或 V2board 節點上,api.node_type 缺失,或者不是 V2ray、Vmess、Vless、Trojan、Shadowsocks、Hysteria2、Hysteria、Hy2、AnyTLS、Socks、Socks5、Http 或 Sss(不區分大小寫)。 使用面板中該節點的型別。
node <id>: <key> is set, but a helium node's protocol is described by the panel; remove it (of [node.hysteria], only congestion is this host's to choose) helium 節點設定了由其面板描述的設定項。<key> 是按以下順序找到的第一個已設定的鍵:[node.api] node_type、[node.api] enable_vless、[node.hysteria] port、[node.hysteria] credential、[node.hysteria] udp、[node.hysteria] udp_idle_timeout、[node.hysteria] obfs、[node.hysteria] obfs_password、[node.hysteria.masquerade]、[node.hysteria] up_mbps、[node.hysteria] down_mbps、[node.hysteria] ignore_client_bandwidth。node_type 和 credential 非空時算作已設定,enable_vless 和 udp 為 true 時算作已設定,port 不為 0 時算作已設定,其他鍵只要寫出就算作已設定。 刪除該設定項。在 [node.hysteria] 中,helium 節點只能設定 congestion。參見 helium。
node <id>: newV2board: no UniProxy panel describes an sss node; sss is Helium's own protocol, served with panel_type = "Helium" NewV2board 或 V2board 節點設定了 api.node_type = "sss"。 從 helium 提供 sss 節點。

重載時,同樣的錯誤會拒絕整次重載:katana 記錄 reload: node <name>: unknown panel_type "<value>"; keeping current config(或上面的其他訊息),不應用任何內容(參見 katana 重載失敗)。

面板请求本身的错误,例如密钥或节点 ID 错误,见故障排查。

节点在一次尝试中上线:katana 从面板读取节点,再读取用户,然后构建节点并绑定监听器。一次尝试失败时,katana 记录原因并再次尝试,因此正在重启的面板、尚未响应的 DNS 服务器或仍被占用的端口都不会让节点一直停着:

日志行 失败的环节
node <id>: node_info failed: <error>; retrying in <N>s 向面板請求節點;在 Xboard 和 V2board 上,也可能是 katana 讀取應答時拒絕了節點:見 katana 無法提供的節點設定。
node <id>: panel returned no node info; retrying in <N>s 面板以 304 Not Modified 响应节点请求,而不是返回节点。
node <id>: user_list failed: <error>; retrying in <N>s 向面板请求用户列表。
node <id>: panel returned no user list; retrying in <N>s 面板以 304 Not Modified 响应用户请求,而不是返回列表。
node <id>: initial start failed: <error>; retrying in <N>s 节点未能构建或绑定,例如因为接下来两节中的证书或节点设置,或者端口绑定失败,显示为 inbound <tag>: binding <address> failed: …。

第一次等待 1 秒,此后每失败一次翻倍,最长 60 秒,并且永远不超过该节点的 update_periodic。重载应用了对该节点 [[node]] 表的修改时,katana 会立即重试,不再等待剩余的时间。每次尝试都会重新向面板请求。节点上线后就不再以这种方式重试;之后的变化由常规轮询应用。

Hysteria 2 以外的节点是否使用 TLS 由面板决定,因此这些错误在节点启动时出现,形式为 node <id>: initial start failed: <error>; retrying in <N>s。

消息 含义 修复方法
node requests kernel-unsupported feature: cert.reject_unknown_sni reject_unknown_sni = true。katana 没有实现它,并在每个节点上拒绝它,无论是否使用 TLS。 删除该键。
node requests kernel-unsupported feature: ACME cert mode "<mode>" mode 为 "dns"、"http" 或 "tls"。katana 没有 ACME 客户端。无论是否使用 TLS,节点都会被拒绝。 使用 mode = "file",并自行续期证书。
TLS node requires cert.mode = "file" 面板开启了 TLS,或者这是 Trojan 节点,而 mode 不是 "file"。默认值为 "none"。 设置 mode = "file"。
TLS node requires cert.cert_file and cert.key_file mode = "file",但路径为空。 设置两个路径。
No such file or directory (os error 2)、Permission denied (os error 13) 证书或私钥文件缺失或无法读取。 检查两个路径和文件属主。
no certificate in PEM bundle,或以 error: 开头的 OpenSSL 消息 这些文件不是 PEM 证书和与之匹配的 PEM 私钥。参见 stream 设置与 TLS。 替换这些文件。

NewV2board 或 V2board 上的 Hysteria 2 節點在檢查時就讀取憑證,因此它的訊息出現在 --test 和啟動時,形式為 node <id>: <error>:

消息 含义 修复方法
hysteria2 node requires cert.mode = "file" Hysteria 2 节点没有设置 mode = "file",包括默认的 "none" 和 ACME 模式。 设置 mode = "file" 以及 cert_file 和 key_file。
node requests kernel-unsupported feature: cert.reject_unknown_sni reject_unknown_sni = true。 删除该键。
TLS node requires cert.cert_file and cert.key_file 某个路径为空。 两个都设置。
building inbound <tag> failed: hysteria2: … 与 etemenanki-app 的 Hysteria 2 入站相同:没有证书、没有私钥,或私钥不匹配。 替换这些文件。

helium 上的 Hysteria 2 節點由面板描述,它在啟動時才第一次讀取憑證和私鑰,所以檔案缺失或無法讀取會出現在 initial start failed: 之後。

有些設定來自面板,--test 無法檢查。在 Xboard 和 V2board 上,katana 讀取面板應答時就會拒絕它沒有實作的設定,而不是提供別的東西。節點啟動過程中記錄 node <id>: node_info failed: parse UniProxy config response: <error>; retrying in <N>s;節點已經啟動時,輪詢記錄 node <id>: node_info: parse UniProxy config response: <error>,節點保留上一次的設定。katana 會一直重試,直到設定改變,所以請在面板上更正它。helium 的節點設定無法描述其中任何一項:試圖這樣做的 helium 應答會出現 parse helium config response: …,並寫出它違反的規則。

消息 含义 修复方法
server_port <n> is not a port (1 to 65535) 面板為節點設定的埠是 0、缺失、負數或大於 65535。katana 拒絕它,而不是改用另一個埠。 在面板上設定節點的埠。
expected value at line 1 column 1 或其他 JSON 錯誤 應答不是 JSON,例如 host 錯誤時得到的 HTML 頁面。 檢查 host,並手動傳送請求;見疑難排解。
a value of the wrong type at line <L>, column <C> 應答中某個欄位的型別不對,例如 server_port 以字串傳送。訊息不寫出值本身。 在面板上更正該欄位。
the panel's node is protocol "<name>", but this node is configured as <type>、the panel's node is protocol "<name>", which katana does not serve 面板為節點設定的 protocol 與 node_type 屬於不同協定族,或是 katana 不提供的協定。 把 node_type 設成與面板節點相符。
security reality runs over transport tcp only 面板為 network 是 WebSocket 或 gRPC 的節點開啟了 REALITY。REALITY 執行在 TCP 上。 在面板上把該節點的 network 設為 TCP。
node requests kernel-unsupported feature: REALITY on a VMess node 面板為 VMess 節點開啟了 REALITY。 以 VLESS 提供該節點(enable_vless = true),或關閉 REALITY。
flow xtls-rprx-vision needs security reality 面板在沒有 REALITY 的 VLESS 節點上設定了 Vision 流控。 開啟 REALITY,或清除 flow。
a REALITY node (tls = 2) carries no tls_settings、the REALITY tls_settings: <error>、REALITY needs a server_name、REALITY needs the cover site's port、REALITY private_key: <error>、REALITY short_id: <error> 面板的 REALITY 設定缺失、格式不對,或其中有 katana 無法使用的值。這些訊息都不會重複私鑰或 shortId。 在面板上更正 REALITY 設定。
security.server_name must be a host name of ASCII letters, digits, -, _ and ., at most 253 bytes, with no wildcard and not ending in a dot REALITY 的 server name 是萬用字元、以點結尾,或含有其他字元。 使用偽裝站點的主機名稱。
node requests kernel-unsupported feature: VLESS flow "<flow>" 面板設定的 VLESS flow 不是 xtls-rprx-vision。 在 REALITY 上使用 xtls-rprx-vision,或清除 flow。
node requests kernel-unsupported feature: an XTLS flow off VLESS 不提供 VLESS 的节点设置了 flow。 清除 flow,或改为提供 VLESS。
node requests kernel-unsupported feature: socks without TLS(http without TLS 同理) 不带 TLS 的 SOCKS 或 HTTP 节点。katana 只在 TLS 内提供这两种协议。 在面板上为该节点开启 TLS。
node requests kernel-unsupported feature: socks over REALITY(http over REALITY 同理) 面板為 SOCKS 或 HTTP 節點開啟了 REALITY。 改用 TLS。
node requests kernel-unsupported feature: httpupgrade transport、… splithttp transport、… transport "<name>" 面板的 network 是 HTTPUpgrade、SplitHTTP 或 XHTTP,或其他 katana 不认识的名称。katana 提供 TCP、WebSocket 和 gRPC。 在面板上更改该节点的 network。
node requests kernel-unsupported feature: tcp header type "<type>" 面板為 TCP 節點(包括 REALITY)設定了標頭混淆,例如 http。katana 只提供裸 TCP:沒有標頭、標頭沒有指定類型,或類型為 none(不分大小寫)。 在面板上把該節點的標頭類型設為 none,並讓它的使用者更新訂閱。
tcp header is not an object 面板為該節點設定的 TCP 標頭不是 JSON 物件。 在面板上修正標頭,或把它的類型設為 none。
tcp header type is not a string 面板為 TCP 標頭指定的類型不是字串。 在面板上修正標頭,或把它的類型設為 none。
node requests kernel-unsupported feature: shadowsocks cipher "<method>" 面板的 Shadowsocks 方法不是 katana 提供的方法:aes-128-gcm、aes-256-gcm、chacha20-ietf-poly1305(或 chacha20-poly1305)和 xchacha20-ietf-poly1305(或 xchacha20-poly1305),不分大小寫,以及 2022-blake3-aes-128-gcm 和 2022-blake3-aes-256-gcm。2022-blake3-chacha20-poly1305 也以這種方式被拒絕。 在面板上選擇受支援的方法。
shadowsocks server_key is not base64、shadowsocks-2022: PSK too short (<n> < <len>) Shadowsocks 2022 節點的 server_key 不是 base64,或比加密方式的金鑰短:2022-blake3-aes-128-gcm 為 16 位元組,2022-blake3-aes-256-gcm 為 32 位元組。 設定長度正確的金鑰,例如用 openssl rand -base64 32 產生。
newV2board: shadowsocks obfs "<value>" is not supported、newV2board: shadowsocks over REALITY is not supported Shadowsocks 節點的 obfs 不是空值、plain 或 none,或開啟了 REALITY。 在面板上關閉它們。
transport.path must start with /、transport.path must have no query but ?ed=N; a node matches the path of an upgrade without one 節點的 WebSocket 路徑不以 / 開頭,或帶有 ?ed=N 以外的查詢參數。 在面板上更正路徑。
transport.host must not have a port; a node matches it against the Host of an upgrade without one 節點的 WebSocket host 帶有埠。 只寫主機。
transport.service_name must not be empty gRPC 節點沒有 service name。 在面板上設定一個。
padding_scheme[<n>] is empty,以及其他 padding_scheme 規則 AnyTLS 節點的填充方案有空行、某一行含換行字元,或超過 2048 位元組。 在面板上更正填充方案。

katana 的 [[outbound]] 采用扁平布局,uuid 和 method 等键直接写在表中。它的消息与 etemenanki-app 不同。每条消息前面都带有 node <id>: 。

消息 含义 修复方法
duplicate/reserved outbound tag <tag> 两个出站使用了相同的 tag,或者 tag 是内置的 direct、block、freedom、blackhole 之一,或以 audit# 开头。 重命名该出站。规则始终可以使用内置 tag。
unknown outbound protocol "<value>" 不是 direct(也可写作 freedom)、socks(也可写作 socks5)、http、vmess、vless、shadowsocks(也可写作 ss)或 wireguard(也可写作 wg),不区分大小写。katana 没有 Trojan 和 Hysteria 2 出站。 使用受支持的协议。
outbound needs a non-empty server and non-zero port (got "<server>":<port>) 代理出站没有 server 或 port。protocol = "blackhole" 的条目也会这样失败:请改用内置的 block tag。 添加 server 和 port。
outbound server "<host>": brackets hold only an IPv6 literal server 的方括号里不是 IPv6 地址。 IPv6 地址加不加方括号都可以,域名和 IPv4 地址不要加。
outbound <tag> needs a uuid VMess 或 VLESS 出站没有 uuid。 添加它。
outbound <tag>: uuid is not a valid UUID uuid 无法解析。 更正 UUID。
unsupported vmess security "<value>" security 不是 auto、aes-128-gcm(也可写作 aes128gcm)或 chacha20-poly1305(也可写作 chacha20poly1305),不区分大小写。不支持 none 和 zero。 使用其中之一,或省略。
shadowsocks outbound <tag> needs a password Shadowsocks 出站没有 password。 添加它。
unsupported shadowsocks cipher "<value>" method 缺失或不是受支持的方法。katana 接受的方法与 etemenanki-app 相同,未知的 2022- 方法也以这种方式报告。 把 method 设为受支持的名称。
decode PSK: <error>、shadowsocks-2022: PSK too short (<n> < <len>) Shadowsocks 2022 的密钥不是 base64,或者太短。 同入站与出站协议。
outbound <tag> invalid address_family "<value>" 与 etemenanki-app 相同,只是 tag 后面没有冒号。 使用列出的取值。
outbound <tag> invalid endpoint_address_family "<value>" WireGuard 出站的 endpoint_address_family 有同样的问题。 使用列出的取值。
wireguard outbound <tag> needs a private_key(public_key 同理) 缺少必需的 WireGuard 密钥。对端的密钥在这里叫 public_key。 添加它。
wireguard outbound <tag> <field>: invalid WireGuard key: expected base64 or hex encoding of 32 bytes private_key、public_key 或 pre_shared_key 解码后不是 32 字节。 粘贴 wg genkey 或 wg pubkey 的输出。
wireguard outbound <tag> needs at least one local_address 没有 local_address。 添加隧道地址。这里允许 /32 之类的前缀长度。
wireguard outbound <tag> invalid local_address "<value>": <error> 某一项不是 IP 地址。 更正它。
outbound <tag>@v0: wireguard address_family ipv6_only needs an IPv6 address(或 ipv4_only … IPv4) 没有 address_family 所要求地址族的 local_address。 添加一个,或修改 address_family。
wireguard outbound <tag> reserved must be exactly 3 bytes reserved 不是三项。 写三个 0 到 255 之间的数字。

katana 出站记录了每个键。

對 node_type 為 Hysteria2、Hysteria 或 Hy2 的節點,--test 和啟動都會用啟動時所用的同一個建構器檢查 [node.hysteria] 和憑證,但不繫結埠。helium 節點沒有 node_type,在 [node.hysteria] 中只能設定 congestion,而 --test 和啟動會在每個節點上檢查它。這些訊息帶有 node <id>: 字首,啟動時 katana 會跳過檢查失敗的節點。

消息 含义 修复方法
unknown hysteria credential kind "<value>" (expected "uuid" or "user_pass") credential 是其他值。 使用 "uuid"(默认)或 "user_pass"。
obfs_password is set but obfs is not; did you mean obfs = "salamander"? 设置了 obfs_password 却没有 obfs。 添加 obfs = "salamander"。
obfs_password must be at least 4 bytes for salamander 混淆密码短于 4 字节。 使用更长的密码。
unknown obfs "<value>" (expected "salamander") obfs 是其他值。 写成 "salamander"。
udp_idle_timeout must be between 2 and 600 seconds 超出范围。 使用 2 到 600。
udp_idle_timeout is set but udp is not enabled 设置了它却没有 udp = true。 开启 udp,或删除该超时。
masquerade.status must not be 233, the Hysteria 2 authentication success status [node.hysteria.masquerade] status = 233。 選擇其他狀態碼。
masquerade.status is <n>, but must be 100 to 999 狀態碼不在 100 到 999 之間。 使用真實的狀態碼。
unknown hysteria congestion "<value>" (expected "cubic", "bbr" or "reno") congestion 是其他值。它区分大小写。 使用这三者之一。

Xboard 或 V2board 描述節點時,obfs 和 obfs_password 來自面板,同樣的混淆訊息會在 katana 讀取面板應答時出現在 node_info failed: parse UniProxy config response: 之後(執行中節點的輪詢則是 node_info: parse UniProxy config response: ),指向面板的設定。哪些設定來自哪裡,見 katana Hysteria 2。

节点的 [node.route] 与 etemenanki-app 的 [route] 使用同样的代码编译,因此会在 node <id>: 之后打印路由规则与 geodata中的消息。不同之处在于:

  • 规则只接受 outbound、domain_suffix、cidr、port、geosite 和 geoip。其他匹配条件(例如 domain_keyword)都是解析错误,显示为 config parse error: TOML parse error at line <n>, column <m>;
  • route references unknown outbound <tag> 表示该 tag 既不是 [[outbound]] 的 tag,也不是内置的 direct、block、freedom 和 blackhole。没有 default 时,未匹配的流量发往 direct;
  • 启动时 katana 会跳过该节点。重载时的情况见 katana 重载失败。

rule_list_path 不会产生错误。文件无法读取时,节点在没有它的情况下启动,并记录警告 cannot read rule_list_path <path>: <error>;不是合法正则表达式的行会被跳过,并记录 invalid local rule "<line>": <error>。参见审计规则。

这些日志行来自 katana::runtime 日志 target。

日志行 发生了什么 怎么办
config reload failed, keeping current: <error> 新文件无法读取或无法解析。没有应用任何内容。 修正文件后再次保存。
reload: node <panel>@<host>#<id>[/<type>]: <error>; keeping current config 本次重載新增或修改的某個節點,或修改 [[outbound]]、[dns] 之後的任何一個節點沒有通過檢查:例如 unknown panel_type "<value>"、panel_type "SSpanel" is not supported: …、unknown node_type "<value>"、[node.api] node_type is set, but a helium node's protocol is described by the panel; …、route references unknown outbound <tag>、building route failed: …,或者某個出站或 [dns] 無法建立。沒有應用任何內容:每個執行中的節點都保持原有設定。啟動時未通過檢查的節點會在每次重載時重新檢查,因此只要它仍有錯誤,每次重載都會被拒絕。<panel> 是小寫的 panel_type,/<type> 是 katana 向 Xboard 或 V2board 面板請求的節點型別。 修正該節點後再次儲存。儲存前先執行 katana --test。
invalid log level "<value>": <error> 新的 [log].level 无法解析。旧的过滤器继续生效,尽管同时也会记录 reload: log level → <value>。 更正级别。
config watcher disabled (no live reload): <error> 启动时无法监视配置目录。katana 继续运行,但在重启之前会忽略对文件的修改。 检查该目录。

katana 热重载介绍了每种修改对运行中节点的影响。