E!Ошибка: база данных телеграф не найдена и не удалось воссоздать - PullRequest
0 голосов
/ 03 июня 2018

Я пытаюсь разработать проект в бэкэнде Django в Ubuntu, и я использую Docker для бэкенда, и я использую InfliffDB для базы данных, но после завершения кода, когда я собираюсь создать Docker, он показывает ошибку, связанную с базой данных Telegraf, например

E! Error: Database telegraf not found and failed to recreate
hook_telegraf      | 2018-06-03T09:10:00Z E! InfluxDB Output Error: Response Error: Status Code [404], expected [204], [database not found: "telegraf"]

и это мой telegraf.conf

[[outputs.influxdb]]
  urls = ["http://influxdb:8086"] # required
  database = "telegraf" # required
  precision = "s"
  retention_policy = "rp_mps_24w"
  write_consistency = "any"
  timeout = "5s"
  username = "test"
  password = "test"

[[inputs.nginx]]
  urls = ["http://localhost/server_status"]

Это ошибка, периодически появляющаяся на экране

2018-06-03T09:03:30Z E! Error in plugin [inputs.nginx]: error making HTTP request to http://localhost/server_status: Get http://localhost/server_status: dial tcp 127.0.0.1:80: getsockopt: connection refused
hook_influxdb      | [httpd] 172.19.0.1 - - [03/Jun/2018:09:03:30 +0000] "POST /write?db=telegraf HTTP/1.1" 404 69 "-" "telegraf" fc2f9f45-670c-11e8-801c-000000000000 618
hook_influxdb      | [httpd] 172.19.0.9 - test [03/Jun/2018:09:03:30 +0000] "POST /write?consistency=any&db=telegraf&rp=rp_mps_24w HTTP/1.1" 404 69 "-" "-" fc3001c6-670c-11e8-801d-000000000000 635
hook_influxdb      | [httpd] 172.19.0.9 - test [03/Jun/2018:09:03:30 +0000] "POST /query?q=CREATE+DATABASE+%22telegraf%22 HTTP/1.1" 403 99 "-" "-" fc30690d-670c-11e8-801e-000000000000 543
hook_telegraf      | 2018-06-03T09:03:30Z E! Error: Database telegraf not found and failed to recreate
hook_telegraf      | 2018-06-03T09:03:30Z E! InfluxDB Output Error: Response Error: Status Code [404], expected [204], [database not found: "telegraf"]
hook_telegraf      | 2018-06-03T09:03:30Z E! Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
hook_influxdb      | [httpd] 172.19.0.1 - - [03/Jun/2018:09:03:30 +0000] "POST /query HTTP/1.1" 403 99 "-" "telegraf" fc32d658-670c-11e8-801f-000000000000 157
hook_influxdb      | [httpd] 172.19.0.1 - - [03/Jun/2018:09:03:40 +0000] "POST /write?db=telegraf HTTP/1.1" 404 69 "-" "telegraf" 022573f9-670d-11e8-8020-000000000000 549
hook_influxdb      | [httpd] 172.19.0.9 - test [03/Jun/2018:09:03:40 +0000] "POST /write?consistency=any&db=telegraf&rp=rp_mps_24w HTTP/1.1" 404 69 "-" "-" 0225dddf-670d-11e8-8021-000000000000 459
hook_influxdb      | [httpd] 172.19.0.9 - test [03/Jun/2018:09:03:40 +0000] "POST /query?q=CREATE+DATABASE+%22telegraf%22 HTTP/1.1" 403 99 "-" "-" 0226377d-670d-11e8-8022-000000000000 592
hook_telegraf      | 2018-06-03T09:03:40Z E! Error: Database telegraf not found and failed to recreate
hook_telegraf      | 2018-06-03T09:03:40Z E! InfluxDB Output Error: Response Error: Status Code [404], expected [204], [database not found: "telegraf"]
hook_telegraf      | 2018-06-03T09:03:40Z E! Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
hook_influxdb      | [httpd] 172.19.0.1 - - [03/Jun/2018:09:03:40 +0000] "POST /query HTTP/1.1" 403 99 "-" "telegraf" 0228c49f-670d-11e8-8023-000000000000 153
hook_influxdb      | [httpd] 172.19.0.1 - - [03/Jun/2018:09:03:50 +0000] "POST /write?db=telegraf HTTP/1.1" 404 69 "-" "telegraf" 081b6d29-670d-11e8-8024-000000000000 552
hook_influxdb      | [httpd] 172.19.0.9 - test [03/Jun/2018:09:03:50 +0000] "POST /write?consistency=any&db=telegraf&rp=rp_mps_24w HTTP/1.1" 404 69 "-" "-" 081bcb1d-670d-11e8-8025-000000000000 297
hook_influxdb      | [httpd] 172.19.0.9 - test [03/Jun/2018:09:03:50 +0000] "POST /query?q=CREATE+DATABASE+%22telegraf%22 HTTP/1.1" 403 99 "-" "-" 081c0aab-670d-11e8-8026-000000000000 291
hook_telegraf      | 2018-06-03T09:03:50Z E! Error: Database telegraf not found and failed to recreate
hook_telegraf      | 2018-06-03T09:03:50Z E! InfluxDB Output Error: Response Error: Status Code [404], expected [204], [database not found: "telegraf"]
hook_telegraf      | 2018-06-03T09:03:50Z E! Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
hook_influxdb      | [httpd] 172.19.0.1 - - [03/Jun/2018:09:03:50 +0000] "POST /query HTTP/1.1" 403 99 "-" "telegraf" 081cdb4c-670d-11e8-8027-000000000000 164
...