N9E一直报错;DEBUG naming/hashring.go:55 datasource id:0 pk:2 failed to get node from hashring:empty circle

Viewed 29

1、n9e一直报如下错误,如何解决:

[root@nightingale n9e]# tail -f n9e.log

2023-05-19 11:02:39.066420 DEBUG naming/hashring.go:55 datasource id:0 pk:2 failed to get node from hashring:empty circle
2023-05-19 11:02:39.066532 DEBUG naming/hashring.go:55 datasource id:0 pk:3 failed to get node from hashring:empty circle
2023-05-19 11:02:39.066564 DEBUG naming/hashring.go:55 datasource id:0 pk:15 failed to get node from hashring:empty circle
2023-05-19 11:02:39.066594 DEBUG naming/hashring.go:55 datasource id:0 pk:4 failed to get node from hashring:empty circle
2023-05-19 11:02:39.066611 DEBUG naming/hashring.go:55 datasource id:0 pk:5 failed to get node from hashring:empty circle
2023-05-19 11:02:39.066662 DEBUG naming/hashring.go:55 datasource id:0 pk:12 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067108 DEBUG naming/hashring.go:55 datasource id:0 pk:9 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067370 DEBUG naming/hashring.go:55 datasource id:0 pk:14 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067426 DEBUG naming/hashring.go:55 datasource id:0 pk:10 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067475 DEBUG naming/hashring.go:55 datasource id:0 pk:11 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067518 DEBUG naming/hashring.go:55 datasource id:0 pk:1 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067547 DEBUG naming/hashring.go:55 datasource id:0 pk:6 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067570 DEBUG naming/hashring.go:55 datasource id:0 pk:7 failed to get node from hashring:empty circle
2023-05-19 11:02:39.067586 DEBUG naming/hashring.go:55 datasource id:0 pk:8 failed to get node from hashring:empty circle
2023-05-19 11:02:40.349272 DEBUG memsto/alert_rule_cache.go:113 alert rules not changed

2、n9e.log的日志很大,可以设置循环写吗?

3 Answers

第一个问题
有这个提示,应该是你的数据源没有关联告警引擎集群,可以到数据源页面关联下
第二个问题
可以修改下夜莺的配置文件, Log 部分改成下面这样,夜莺会把日志输入到文件,然后会自动对文件按照小时进行切分,保留 12 小时的日志

[Log]
# log write dir
Dir = "logs"
# log level: DEBUG INFO WARNING ERROR
Level = "DEBUG"
# stdout, stderr, file
Output = "file"
# # rotate by time
KeepHours = 12
# # rotate by size
# RotateNum = 3
# # unit: MB
# RotateSize = 256

1.我看这都是debug的输出,应该不是错误,看样子像是key去找哈希环没找到节点,我前些天正好写了个博客分析了一下夜莺使用哈希环的部分一致性哈希(哈希环)解决数据分布问题,希望对你有用,如果有其他异常,这部分日志应该不是对应的部分
2.日志大问题我觉得如果你是用nohup启动,这篇应该能回答这个问题,写一个脚本使用split命令分割有效处理nohup日志输出过大的问题