==> Failed to setup logging: open /data/services/consul/client/logs/consul-1658741322694475918.log: no such file or directory
处理方法:
1、第一种,就是没权限,直接chown 给 权限
sudo chown -R /data/services/consul
2、就是配置的问题
{
"datacenter": "dc1",
"node_name": "consul-client-02",
"data_dir": "/data/services/consul/client/data",
"ports":{
"http":8700
},
"log_level": "INFO",
"log_file": "/data/services/consul/client/logs/",
"ui": true,
"bind_addr": "10.10.5.80",
"client_addr": "0.0.0.0",
"retry_join": ["10.10.5.147","10.10.5.148","10.10.5.149"],
"retry_interval": "10s",
"raft_protocol": 3,
"enable_debug": false,
"rejoin_after_leave": true,
"enable_syslog": true
}
一眼看上去没什么,但重点是缺了一个参数log_rotate_duration
只要 加上一个 "log_rotate_duration": "24h",完美解决,同理,还可能会是因为缺了某个参数导致的,但看不出来而已。