【问题标题】:Why influxdb fails to start?为什么 influxdb 无法启动?
【发布时间】:2019-07-11 07:17:35
【问题描述】:

我安装了 Influxdb 版本(InfluxDB v1.7.7)

我刚刚安装并尝试在不更改配置文件中的任何内容的情况下启动 infludb...

我使用 influxd 来启动 influxdb

但我无法开始...我收到如下错误...请帮助我

 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"

2019-07-11T07:17:02.124129Z     info    InfluxDB starting       {"log_id": "0GZz7YB0000", "version": "1.7.7", "branch": "1.7", "commit": "f8fdf652f348fc9980997fe1c972e2b79ddd13b0"}
2019-07-11T07:17:02.124155Z     info    Go runtime      {"log_id": "0GZz7YB0000", "version": "go1.11", "maxprocs": 4}
2019-07-11T07:17:02.225149Z     info    Using data dir  {"log_id": "0GZz7YB0000", "service": "store", "path": "/var/lib/influxdb/data"}
2019-07-11T07:17:02.225206Z     info    Compaction settings     {"log_id": "0GZz7YB0000", "service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
2019-07-11T07:17:02.225229Z     info    Open store (start)      {"log_id": "0GZz7YB0000", "service": "store", "trace_id": "0GZz7Y_G000", "op_name": "tsdb_open", "op_event": "start"}
2019-07-11T07:17:02.225320Z     info    Open store (end)        {"log_id": "0GZz7YB0000", "service": "store", "trace_id": "0GZz7Y_G000", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "0.094ms"}
run: open server: open tsdb store: mkdir /var/lib/influxdb/data/_internal/_series: permission denied

sudo 涌入

 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"

2019-07-11T09:57:11.220614Z     info    InfluxDB starting       {"log_id": "0G_7I1i0000", "version": "1.7.7", "branch": "1.7", "commit": "f8fdf652f348fc9980997fe1c972e2b79ddd13b0"}
2019-07-11T09:57:11.220640Z     info    Go runtime      {"log_id": "0G_7I1i0000", "version": "go1.11", "maxprocs": 4}
2019-07-11T09:57:11.321428Z     info    Using data dir  {"log_id": "0G_7I1i0000", "service": "store", "path": "/var/lib/influxdb/data"}
2019-07-11T09:57:11.321462Z     info    Compaction settings     {"log_id": "0G_7I1i0000", "service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
2019-07-11T09:57:11.321474Z     info    Open store (start)      {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "op_event": "start"}
2019-07-11T09:57:11.322432Z     info    Reading file    {"log_id": "0G_7I1i0000", "engine": "tsm1", "service": "cacheloader", "path": "/var/lib/influxdb/wal/_internal/monitor/2/_00001.wal", "size": 10413807}
2019-07-11T09:57:11.322610Z     info    Opened file     {"log_id": "0G_7I1i0000", "engine": "tsm1", "service": "filestore", "path": "/var/lib/influxdb/data/_internal/monitor/1/000000001-000000001.tsm", "id": 0, "duration": "0.121ms"}
2019-07-11T09:57:11.326176Z     info    Opened shard    {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "index_version": "inmem", "path": "/var/lib/influxdb/data/_internal/monitor/1", "duration": "4.013ms"}
2019-07-11T09:57:11.853856Z     info    Opened shard    {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "index_version": "inmem", "path": "/var/lib/influxdb/data/_internal/monitor/2", "duration": "531.737ms"}
2019-07-11T09:57:11.854060Z     info    Open store (end)        {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "532.586ms"}
2019-07-11T09:57:11.854108Z     info    Opened service  {"log_id": "0G_7I1i0000", "service": "subscriber"}
2019-07-11T09:57:11.854124Z     info    Starting monitor service        {"log_id": "0G_7I1i0000", "service": "monitor"}
2019-07-11T09:57:11.854137Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "build"}
2019-07-11T09:57:11.854148Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "runtime"}
2019-07-11T09:57:11.854158Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "network"}
2019-07-11T09:57:11.854176Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "system"}
2019-07-11T09:57:11.854198Z     info    Starting precreation service    {"log_id": "0G_7I1i0000", "service": "shard-precreation", "check_interval": "10m", "advance_period": "30m"}
2019-07-11T09:57:11.854213Z     info    Starting snapshot service       {"log_id": "0G_7I1i0000", "service": "snapshot"}
2019-07-11T09:57:11.854227Z     info    Starting continuous query service       {"log_id": "0G_7I1i0000", "service": "continuous_querier"}
2019-07-11T09:57:11.854243Z     info    Starting HTTP service   {"log_id": "0G_7I1i0000", "service": "httpd", "authentication": false}
2019-07-11T09:57:11.854254Z     info    opened HTTP access log  {"log_id": "0G_7I1i0000", "service": "httpd", "path": "stderr"}
2019-07-11T09:57:11.854354Z     info    Listening on HTTP       {"log_id": "0G_7I1i0000", "service": "httpd", "addr": "[::]:8086", "https": false}
2019-07-11T09:57:11.854377Z     info    Starting retention policy enforcement service   {"log_id": "0G_7I1i0000", "service": "retention", "check_interval": "30m"}
2019-07-11T09:57:11.854856Z     info    Storing statistics      {"log_id": "0G_7I1i0000", "service": "monitor", "db_instance": "_internal", "db_rp": "monitor", "interval": "10s"}
2019-07-11T09:57:11.855369Z     info    Listening for signals   {"log_id": "0G_7I1i0000"}
2019-07-11T09:57:11.855607Z     info    Sending usage statistics to usage.influxdata.com        {"log_id": "0G_7I1i0000"}

【问题讨论】:

  • 您需要以root身份运行。 sudo 或 su - 从你的 shell 以 root 身份登录。
  • @Alfred E. Noobman 谢谢你的回复......当我运行 sudo influxd 时,你能在问题部分找到上面的输出吗......它一直在听......在浏览器中无法访问
  • 您使用的是哪个操作系统?
  • @Alfred E. Noobman Centos 7
  • @Alfred E. Noobman 请帮助我......我正在努力解决这个问题

标签: bash influxdb collectd


【解决方案1】:

运行:打开服务器:打开 tsdb 存储:mkdir /var/lib/influxdb/data/_internal/_series: 权限被拒绝

您的用户无权访问此路径。这就是问题所在。通常 /var/lib 路径归 root 用户所有。因此,如果您的用户具有 sudo 权限,则使用 sudo 执行启动命令应该可以解决此问题。

检查 influxDB 配置文件以根据需要操作 InfluxDB 的数据路径。配置文件路径一般为/etc/influxdb/influxdb.conf。

您的第二个问题是使用浏览器访问数据库。

检查 influxdb.conf 文件中的 http 配置:

[http]
  enabled = true
  bind-address = ":8086"
  auth-enabled = false
  log-enabled = true
  write-tracing = false
  pprof-enabled = false
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
  ### Use a separate private key location.
  # https-private-key = ""
  max-row-limit = 10000
  realm = "InfluxDB"
  • 确保您使用的是正确的端口。
  • 检查除 influxdb 之外当前没有其他进程占用该端口。
  • 确保没有防火墙阻止您访问该端口。

【讨论】:

  • 1.3版本后influxdb将不支持浏览器
  • @ShwetthaRR 很有趣。即使在使用 http 协议的更高版本中,也有一个可用的 rest 端点。所以浏览器支持不会消失。
【解决方案2】:

将数据库作为服务运行(而不是从命令行)并检查状态:

sudo service influxdb start
sudo serivce influxdb status

或者如果您的操作系统使用的是 systemd(CentOS 7+、RHEL 7+):

sudo systemctl start influxdb
sudo systemctl status influxdb

然后用浏览器连接到 localhost 的 8088 端口

http://localhost:8086

查看配置:

influxd config

配置文件位于:

/etc/influxdb/influxdb.conf

按照文档操作:

https://docs.influxdata.com/influxdb/v1.7/administration/config/

【讨论】:

  • 我的 influx DB 版本是 1.7 sudo systemctl start influxdb 它不工作...我该怎么办
  • influxdb 无法访问我的浏览器
  • 我知道了influxdb不能在浏览器上运行的原因......在influx 1.3版本之后它与浏览器不兼容
猜你喜欢
  • 2013-11-12
  • 1970-01-01
  • 2022-08-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-06-14
  • 1970-01-01
  • 2018-07-11
相关资源
最近更新 更多