【发布时间】:2016-10-26 15:28:50
【问题描述】:
正如标题所述,我无法让 Influxdb 监听配置中定义的 udp 端口。
udp 的配置如下所示:
[[udp]]
enabled = true
bind-address = ":8089"
database = "testdb"
retention-policy = ""
batch-size = 5000
batch-pending = 10
read-buffer = 0
batch-timeout = "1s"
precision = ""
Http/tcp 连接工作正常,但不是 udp。
我用netstat -aun检查了端口,结果是:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 0.0.0.0:54601 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp6 0 0 :::38131 :::*
未列出定义的 udp 端口。
我已经用sudo service influxdb restart 重新启动了 influxdb,但它没有帮助。
我错过了什么?
更新 7.11.2016 21:59
我运行了命令:influxd -config influxdb.generated.conf 看到这样的输出:
8888888 .d888 888 8888888b. 888888b.
888 d88P" 888 888 "Y88b 888 "88b
888 888 888 888 888 888 .88P
888 88888b. 888888 888 888 888 888 888 888 888 8888888K.
888 888 "88b 888 888 888 888 Y8bd8P' 888 888 888 "Y88b
888 888 888 888 888 888 888 X88K 888 888 888 888
888 888 888 888 888 Y88b 888 .d8""8b. 888 .d88P 888 d88P
8888888 888 888 888 888 "Y88888 888 888 8888888P" 8888888P"
[run] 2016/11/07 19:54:57 InfluxDB starting, version 1.0.2, branch master, commit ff307047057b7797418998a4ed709b0c0f346324
[run] 2016/11/07 19:54:57 Go version go1.6.2, GOMAXPROCS set to 2
[run] 2016/11/07 19:54:57 Using configuration at: influxdb.generated.conf
run: open server: listen: listen tcp :8088: bind: address already in use
它没有说明 udp 端口。
13.4.2020 更新 问题已解决。
这是一个老问题,我不记得我是如何解决这个问题的,但我做到了。如果我没记错的话,问题是 Influx 没有加载正确的配置文件,这是我当时的愚蠢。可悲的是,我不记得为什么会发生这种情况,但我记得那是我自己做的。请记住始终正确阅读文档,并通过 google 搜索。
【问题讨论】:
-
你使用的是什么版本的 InfluxDB?
-
@MichaelDesa:InfluxDB shell 版本:1.0.2
-
它似乎对我有用。日志中是否报告了任何错误?另外,当您通过运行
influxd -config /path/to/your/config启动进程而不是作为服务时发生了什么? -
@MichaelDesa:日志文件太大了,甚至都很难打开它,更不用说从中搜索任何内容了。 :D Tail -50 没有显示一些 Grafana 查询的其他内容。我猜某处或某处有一个调试标志。我不认为它应该记录这样的事情。我将在几秒钟内更新该命令的输出。
-
能不能先关闭服务再运行
influxd -config influxdb.generated.conf