码迷,mamicode.com
首页 > 其他好文 > 详细

启动open-falcon失败([falcon-aggregator] failed to start)

时间:2020-07-12 10:38:40      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:修改   root密码   ash   安装   wait   use   alarm   moni   公司   

最近公司要部署监控,所以一直在研究小米的开源监控系统open-falcon。一切安装好后,启动open-falcon。open-falcon start

[falcon-graph] 373
[falcon-hbs] 388
[falcon-judge] 399
[falcon-transfer] 411
[falcon-nodata] 427
[falcon-aggregator] failed to start

出现了falcon-aggregator启动失败:然后进进入到aggregator查看日志:

cd /root/aggregator/logs/

cat aggregator.log

020/07/12 10:12:43 cfg.go:88: read config file: /root/aggregator/config/cfg.json successfully
2020/07/12 10:12:43 db.go:37: ping db fail: Error 1045: Access denied for user ‘root‘@‘localhost‘ (using password: NO)

很明显是由于访问数据库失败,原因是密码不对,于是在其配置文件/root/aggregator/config/cfg.json添加了mysql的密码:

cat aggregator/config/cfg.json
"database": {
"addr": "root:Monitor@tcp(127.0.0.1:3306)/falcon_portal?loc=Local&parseTime=true",
"idle": 10,
"ids": [1, -1],
"interval": 55
}

备注:

部分模块依赖连接数据库,如果不修改配置文件,aggregator模块无法启动,graph、hbs、nodata、api、alarm模块开启不报错但是状态为开启失败。
1、vim /home/work/open-falcon/aggregator/config/cfg.json
“addr”: “root:@tcp(127.0.0.1:3306)/falcon_portal?loc=Local&parseTime=true”,
root:和@之间为mysql的root密码,若无则留空
2、vim /home/work/open-falcon/graph/config/cfg.json
“dsn”: “root:@tcp(127.0.0.1:3306)/graph?loc=Local&parseTime=true”,
root:和@之间为mysql的root密码,若无则留空
3、vim /home/work/open-falcon/hbs/config/cfg.json
“database”: “root:@tcp(127.0.0.1:3306)/falcon_portal?loc=Local&parseTime=true”,
root:和@之间为mysql的root密码,若无则留空
4、vim /home/work/open-falcon/nodata/config/cfg.json
“dsn”: “root:@tcp(127.0.0.1:3306)/falcon_portal?loc=Local&parseTime=true&wait_timeout=604800”,
root:和@之间为mysql的root密码,若无则留空
5、vim /home/work/open-falcon/api/config/cfg.json
“faclon_portal”: “root:@tcp(127.0.0.1:3306)/falcon_portal?charset=utf8&parseTime=True&loc=Local”,
“graph”: “root:@tcp(127.0.0.1:3306)/graph?charset=utf8&parseTime=True&loc=Local”,
“uic”: “root:@tcp(127.0.0.1:3306)/uic?charset=utf8&parseTime=True&loc=Local”,
“dashboard”: “root:@tcp(127.0.0.1:3306)/dashboard?charset=utf8&parseTime=True&loc=Local”,
“alarms”: “root:@tcp(127.0.0.1:3306)/alarms?charset=utf8&parseTime=True&loc=Local”,
root:和@之间为mysql的root密码,若无则留空
6、vim /home/work/open-falcon/alarm/config/cfg.json
“addr”: “root:@tcp(127.0.0.1:3306)/alarms?charset=utf8&loc=Asia%2FChongqing”,
root:和@之间为mysql的root密码,若无则留空

启动open-falcon失败([falcon-aggregator] failed to start)

标签:修改   root密码   ash   安装   wait   use   alarm   moni   公司   

原文地址:https://www.cnblogs.com/love-vce/p/13287179.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!