influxdata / influxdata/influxdata-docker

DB initialization is broken when INFLUXDB_HTTP_AUTH_ENABLED is used

Open
#224 10 comments 4 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
364
Forks
255
Avg merge
3h 18m
Merged PRs (30d)
7

Description

Tried it with `:1.5`, `:1.5-alpine`, `:1.4`, the log is more or less the same:

```
+ docker run --rm --name=influxdb -p 8086:8086 -p 2003:2003 -e INFLUXDB_DB=test -e INFLUXDB_HTTP_AUTH_ENABLED=1 -e INFLUXDB_ADMIN_USER=dbroot -v influxdb:/var/lib/influxdb influxdb:1.5
influxdb init process in progress...
ts=2018-05-12T12:49:22.247503Z lvl=info msg="InfluxDB starting" log_id=0816DeHl000 version=1.5.2 branch=1.5 commit=02d7d4f043b34ecb4e9b2dbec298c6f9450c2a32
ts=2018-05-12T12:49:22.247778Z lvl=info msg="Go runtime" log_id=0816DeHl000 version=go1.9.2 maxprocs=1
ts=2018-05-12T12:49:22.401471Z lvl=info msg="Using data dir" log_id=0816DeHl000 service=store path=/var/lib/influxdb/data
ts=2018-05-12T12:49:22.403338Z lvl=info msg="Open store (start)" log_id=0816DeHl000 service=store trace_id=0816Detl000 op_name=tsdb_open op_event=start
ts=2018-05-12T12:49:22.404857Z lvl=info msg="Open store (end)" log_id=0816DeHl000 service=store trace_id=0816Detl000 op_name=tsdb_open op_event=end op_elapsed=1.533ms
ts=2018-05-12T12:49:22.405348Z lvl=info msg="Opened service" log_id=0816DeHl000 service=subscriber
ts=2018-05-12T12:49:22.405759Z lvl=info msg="Starting monitor service" log_id=0816DeHl000 service=monitor
ts=2018-05-12T12:49:22.406430Z lvl=info msg="Registered diagnostics client" log_id=0816DeHl000 service=monitor name=build
ts=2018-05-12T12:49:22.406455Z lvl=info msg="Registered diagnostics client" log_id=0816DeHl000 service=monitor name=runtime
ts=2018-05-12T12:49:22.406492Z lvl=info msg="Registered diagnostics client" log_id=0816DeHl000 service=monitor name=network
ts=2018-05-12T12:49:22.406508Z lvl=info msg="Registered diagnostics client" log_id=0816DeHl000 service=monitor name=system
ts=2018-05-12T12:49:22.406746Z lvl=info msg="Starting precreation service" log_id=0816DeHl000 service=shard-precreation check_interval=10m advance_period=30m
ts=2018-05-12T12:49:22.407587Z lvl=info msg="Starting snapshot service" log_id=0816DeHl000 service=snapshot
ts=2018-05-12T12:49:22.407605Z lvl=info msg="Starting continuous query service" log_id=0816DeHl000 service=continuous_querier
ts=2018-05-12T12:49:22.407616Z lvl=info msg="Starting HTTP service" log_id=0816DeHl000 service=httpd authentication=true
ts=2018-05-12T12:49:22.407625Z lvl=info msg="opened HTTP access log" log_id=0816DeHl000 service=httpd path=stderr
ts=2018-05-12T12:49:22.407719Z lvl=info msg="Listening on HTTP" log_id=0816DeHl000 service=httpd addr=127.0.0.1:8086 https=false
ts=2018-05-12T12:49:22.407769Z lvl=info msg="Starting retention policy enforcement service" log_id=0816DeHl000 service=retention check_interval=30m
ts=2018-05-12T12:49:22.407885Z lvl=info msg="Listening for signals" log_id=0816DeHl000
ts=2018-05-12T12:49:22.409321Z lvl=info msg="Storing statistics" log_id=0816DeHl000 service=monitor db_instance=_internal db_rp=monitor interval=10s
ts=2018-05-12T12:49:22.410203Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0816DeHl000
[httpd] 127.0.0.1 - - [12/May/2018:12:49:23 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e549969a-55e2-11e8-8001-000000000000 214
[httpd] 127.0.0.1 - - [12/May/2018:12:49:23 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e549c86b-55e2-11e8-8002-000000000000 280
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:24 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e5e4f81d-55e2-11e8-8003-000000000000 44
[httpd] 127.0.0.1 - - [12/May/2018:12:49:24 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e5e51759-55e2-11e8-8004-000000000000 97
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:25 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e67f8c18-55e2-11e8-8005-000000000000 73
[httpd] 127.0.0.1 - - [12/May/2018:12:49:25 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e67fb803-55e2-11e8-8006-000000000000 238
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:26 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e71ab3f7-55e2-11e8-8007-000000000000 45
[httpd] 127.0.0.1 - - [12/May/2018:12:49:26 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e71acfac-55e2-11e8-8008-000000000000 98
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:27 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e7b542ed-55e2-11e8-8009-000000000000 74
[httpd] 127.0.0.1 - - [12/May/2018:12:49:27 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e7b56ffb-55e2-11e8-800a-000000000000 156
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:28 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e85089df-55e2-11e8-800b-000000000000 55
[httpd] 127.0.0.1 - - [12/May/2018:12:49:28 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e850b055-55e2-11e8-800c-000000000000 132
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:29 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e8ec0567-55e2-11e8-800d-000000000000 44
[httpd] 127.0.0.1 - - [12/May/2018:12:49:29 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e8ec241a-55e2-11e8-800e-000000000000 89
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:30 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" e9875d04-55e2-11e8-800f-000000000000 132
[httpd] 127.0.0.1 - - [12/May/2018:12:49:30 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" e987a3d2-55e2-11e8-8010-000000000000 107
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:31 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" ea22f3c0-55e2-11e8-8011-000000000000 136
[httpd] 127.0.0.1 - - [12/May/2018:12:49:31 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" ea23483c-55e2-11e8-8012-000000000000 90
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:32 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" eabec11b-55e2-11e8-8013-000000000000 296
[httpd] 127.0.0.1 - - [12/May/2018:12:49:32 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" eabef722-55e2-11e8-8014-000000000000 106
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:33 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" eb595a51-55e2-11e8-8015-000000000000 54
[httpd] 127.0.0.1 - - [12/May/2018:12:49:33 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" eb598ea4-55e2-11e8-8016-000000000000 113
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:34 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" ebf3e5e3-55e2-11e8-8017-000000000000 72
[httpd] 127.0.0.1 - - [12/May/2018:12:49:34 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" ebf41298-55e2-11e8-8018-000000000000 163
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:35 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" ec8f1011-55e2-11e8-8019-000000000000 74
[httpd] 127.0.0.1 - - [12/May/2018:12:49:35 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" ec8f3b65-55e2-11e8-801a-000000000000 229
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:36 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" ed2a7332-55e2-11e8-801b-000000000000 44
[httpd] 127.0.0.1 - - [12/May/2018:12:49:36 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" ed2a9298-55e2-11e8-801c-000000000000 95
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:37 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" edc5c271-55e2-11e8-801d-000000000000 138
[httpd] 127.0.0.1 - - [12/May/2018:12:49:37 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" edc60ddf-55e2-11e8-801e-000000000000 94
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:38 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" ee6146af-55e2-11e8-801f-000000000000 130
[httpd] 127.0.0.1 - - [12/May/2018:12:49:38 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" ee61fb62-55e2-11e8-8020-000000000000 302
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:39 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" eefd7a0d-55e2-11e8-8021-000000000000 44
[httpd] 127.0.0.1 - - [12/May/2018:12:49:39 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" eefd9495-55e2-11e8-8022-000000000000 90
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:40 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" ef97d42b-55e2-11e8-8023-000000000000 53
[httpd] 127.0.0.1 - - [12/May/2018:12:49:40 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" ef97f5b1-55e2-11e8-8024-000000000000 128
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:41 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f03256cd-55e2-11e8-8025-000000000000 72
[httpd] 127.0.0.1 - - [12/May/2018:12:49:41 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f03283e3-55e2-11e8-8026-000000000000 163
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:42 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f0cd7a68-55e2-11e8-8027-000000000000 72
[httpd] 127.0.0.1 - - [12/May/2018:12:49:42 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f0cda3c3-55e2-11e8-8028-000000000000 159
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:43 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f168e1de-55e2-11e8-8029-000000000000 44
[httpd] 127.0.0.1 - - [12/May/2018:12:49:43 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f16900c3-55e2-11e8-802a-000000000000 96
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:44 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f204500c-55e2-11e8-802b-000000000000 130
[httpd] 127.0.0.1 - - [12/May/2018:12:49:44 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f2048158-55e2-11e8-802c-000000000000 98
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:45 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f29fb00b-55e2-11e8-802d-000000000000 130
[httpd] 127.0.0.1 - - [12/May/2018:12:49:45 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f2a02222-55e2-11e8-802e-000000000000 214
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:46 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f33b580f-55e2-11e8-802f-000000000000 137
[httpd] 127.0.0.1 - - [12/May/2018:12:49:46 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f33bcbf1-55e2-11e8-8030-000000000000 99
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:47 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f3d632fa-55e2-11e8-8031-000000000000 55
[httpd] 127.0.0.1 - - [12/May/2018:12:49:47 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f3d65222-55e2-11e8-8032-000000000000 125
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:48 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f470b703-55e2-11e8-8033-000000000000 73
[httpd] 127.0.0.1 - - [12/May/2018:12:49:48 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f470e29f-55e2-11e8-8034-000000000000 163
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:49 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f50be77f-55e2-11e8-8035-000000000000 72
[httpd] 127.0.0.1 - - [12/May/2018:12:49:49 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f50c12c2-55e2-11e8-8036-000000000000 219
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:50 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f5a74e96-55e2-11e8-8037-000000000000 49
[httpd] 127.0.0.1 - - [12/May/2018:12:49:50 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f5a77e7f-55e2-11e8-8038-000000000000 94
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:51 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f642dd86-55e2-11e8-8039-000000000000 44
[httpd] 127.0.0.1 - - [12/May/2018:12:49:51 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f642fc80-55e2-11e8-803a-000000000000 90
influxdb init process in progress...
[httpd] 127.0.0.1 - - [12/May/2018:12:49:52 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.5.2" f6de3674-55e2-11e8-803b-000000000000 130
[httpd] 127.0.0.1 - - [12/May/2018:12:49:52 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+test HTTP/1.1" 403 87 "-" "InfluxDBShell/1.5.2" f6de8a4b-55e2-11e8-803c-000000000000 98
influxdb init process in progress...
influxdb init process failed.
```
Without `INFLUXDB_HTTP_AUTH_ENABLED=1` it seems to work fine (but all `INFLUXDB_*_USER`s are not created).

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file or test is identified. Reproduce the shown Docker command with INFLUXDB_HTTP_AUTH_ENABLED, INFLUXDB_ADMIN_USER, and INFLUXDB_DB, then trace the container's initialization entry point and its authenticated database-creation request; done means initialization completes instead of repeatedly receiving HTTP 403 responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.