Consul的坑
配置文件错误
error reading server metadata
D:\ATS\env\test>consul.exe agent -bind 127.0.0.1 -client 0.0.0.0 -server -bootstrap -ui -data-dir=D:\ATS\env\test\data
==> Starting Consul agent...
Version: '1.16.2'
Build Date: '2023-09-19 19:29:18 +0000 UTC'
Node ID: '21e81335-a3c7-7179-c949-734a7a221e3b'
Node name: 'windows-aq'
Datacenter: 'dc1' (Segment: '<all>')
Server: true (Bootstrap: true)
Client Addr: [0.0.0.0] (HTTP: 8500, HTTPS: -1, gRPC: -1, gRPC-TLS: 8503, DNS: 8600)
Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
Gossip Encryption: false
Auto-Encrypt-TLS: false
ACL Enabled: false
Reporting Enabled: false
ACL Default Policy: allow
HTTPS TLS: Verify Incoming: false, Verify Outgoing: false, Min Version: TLSv1_2
gRPC TLS: Verify Incoming: false, Min Version: TLSv1_2
Internal RPC TLS: Verify Incoming: false, Verify Outgoing: false (Verify Hostname: false), Min Version: TLSv1_2
==> Log data will now stream in as it occurs:
2024-01-29T10:27:59.349+0800 [WARN] agent: bootstrap = true: do not enable unless necessary
2024-01-29T10:27:59.469+0800 [WARN] agent.auto_config: bootstrap = true: do not enable unless necessary
2024-01-29T10:28:09.475+0800 [ERROR] agent: startup error: error="error reading server metadata: invalid character 'x' after top-level value"
2024-01-29T10:28:19.486+0800 [ERROR] agent: startup error: error="error reading server metadata: invalid character 'x' after top-level value"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
解决:里面的字符集编码出现了问题,删除对应的 data 文件,重新安装即可