【问题标题】:Stats.d throws "connect ECONNREFUSED" error when graphite is on a different server当石墨在不同的服务器上时,Stats.d 抛出“连接 ECONNREFUSED”错误
【发布时间】:2014-01-30 09:54:19
【问题描述】:

我已按照本教程安装和配置 stats.d 和 Graphite:

http://www.elao.com/blog/linux/install-stats-d-graphite-on-a-debian-server-to-monitor-a-symfony2-application-12.html

但是,我的石墨只能看到本地代理,当我在另一台服务器上启动我的 statsd 时,出现此错误

30 Jan 10:50:29 - DEBUG: numStats: 3
30 Jan 10:50:29 - DEBUG: Error: connect ECONNREFUSED

这是我的 stats.d local.js 配置文件:

{
  graphitePort: 2003
, graphiteHost: "my.ip.add"
, port: 8125
, backends: [ "./backends/graphite" ]
, debug: true
, dumpMessages: true
}

无论我输入 ip 还是石墨的主机,它都不会改变任何东西。

另外,如果这有帮助,两台服务器(一台带有 stats.d 和一台带有石墨)是运行 Debian 7 的 ovh kimsufi 服务器

【问题讨论】:

    标签: node.js graphite statsd


    【解决方案1】:

    看起来像是来自here 的节点问题(statsd 是一个节点应用程序):

    设置服务器绑定到 0.0.0.0,设置客户端连接到 服务器的正确 IP 地址。如果服务器正在监听 127.0.0.1,它将只接受来自其本地主机的连接。

    ENABLE_UDP_LISTENER = True
    UDP_RECEIVER_INTERFACE = 0.0.0.0
    UDP_RECEIVER_PORT = 2003
    

    【讨论】:

    • 是的,但要启动 stadsd,我只需执行“screen node stats.js local.js”。我不熟悉nodejs,也不太明白该怎么做:/
    • 我认为问题出在石墨端。似乎它在127.0.0.1 上收听而不是0.0.0.0。
    猜你喜欢
    • 2021-04-15
    • 2012-11-08
    • 1970-01-01
    • 2015-06-12
    • 2016-01-22
    • 1970-01-01
    • 2020-05-04
    • 2016-05-13
    • 2019-11-22
    相关资源
    最近更新 更多