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


    最近公司要部署监控,所以一直在研究小米的开源监控系统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密码,若无则留空

  • 相关阅读:
    JavaScript (new)创建一个对象的过程
    我所理解的promise的then方法
    promise与async和await的区别
    JS Promise实例 then()方法
    电脑上不去网
    es6----set map应用场景
    ES6新特性一览
    es6继承
    es6中class类的全方面理解(一)
    时间处理金字教程
  • 原文地址:https://www.cnblogs.com/love-vce/p/13287179.html
Copyright © 2020-2023  润新知