influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.93k stars 3.55k forks source link

influx setup does not create directory to store credentials #12356

Closed sebito91 closed 5 years ago

sebito91 commented 5 years ago

Running the influx setup from CLI on v2.0.0-alpha4 doesn't render the credentials file at the location specified in output.

When I log into the GUI with the user/pass defined on CLI I can retrieve the token.

[sborza@icebox]:~:$ influx setup
Welcome to InfluxDB 2.0!
Please type your primary username: sborza

Please type your password:

Please type your password again:

Please type your primary organization name: coderz

Please type your primary bucket name: icebox

Please type your retention period in hours.
Or press ENTER for infinite.:

You have entered:
  Username:          sborza
  Organization:      coderz
  Bucket:            icebox
  Retention Period:  infinite
Confirm? (y/n): y

Your token has been stored in /home/sborza/.influxdbv2/credentials.
User    Organization    Bucket
sborza  coderz          icebox
[sborza@icebox]:~:$ ls -alh /home/sborza/.influxdbv2/credentials
ls: cannot access '/home/sborza/.influxdbv2/credentials': No such file or directory

OS

[sborza@icebox]:~:$ cat /etc/redhat-release
Fedora release 28 (Twenty Eight)
[sborza@icebox]:~:$ go version
go version go1.12 linux/amd64

EXTRA LOGS

[sborza@icebox]:/var/lib/influxdb:$ grep -v Ticked /var/log/influxdb/influxdb.log
ts=2019-03-05T04:59:28.225542Z lvl=info msg="Welcome to InfluxDB" log_id=0D~3NlOG000 version=2.0.0-alpha.4 commit=801659960 build_date=2019-02-22T00:56:51Z
ts=2019-03-05T04:59:28.232685Z lvl=info msg="Resources opened" log_id=0D~3NlOG000 service=bolt path=/var/lib/influxdb/v2/influxd.bolt
ts=2019-03-05T04:59:28.247528Z lvl=info msg="Opening Series File (start)" log_id=0D~3NlOG000 service=storage-engine service=series-file trace_id=0D~3NlTl000 op_name=series_file_open path=/var/lib/influxdb/v2/engine/_series op_event=start
ts=2019-03-05T04:59:28.249206Z lvl=info msg="Opening Series File (end)" log_id=0D~3NlOG000 service=storage-engine service=series-file trace_id=0D~3NlTl000 op_name=series_file_open path=/var/lib/influxdb/v2/engine/_series op_event=end op_elapsed=1.680ms
ts=2019-03-05T04:59:28.250541Z lvl=info msg="Index opened" log_id=0D~3NlOG000 service=storage-engine index=tsi partitions=8
ts=2019-03-05T04:59:28.251133Z lvl=info msg="Reloaded WAL" log_id=0D~3NlOG000 service=storage-engine path=/var/lib/influxdb/v2/engine/wal duration=0.105ms
ts=2019-03-05T04:59:28.251185Z lvl=info msg=Starting log_id=0D~3NlOG000 service=storage-engine component=retention_enforcer check_interval=1h
ts=2019-03-05T04:59:28.584146Z lvl=info msg=Starting log_id=0D~3NlOG000 service=telemetry interval=8h
ts=2019-03-05T04:59:28.584201Z lvl=info msg=Listening log_id=0D~3NlOG000 service=http transport=http addr=:9999 port=9999
ts=2019-03-05T05:00:42.170079Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/setup status=200 duration_ns=69778
ts=2019-03-05T05:00:42.170124Z lvl=info msg=platform:/api/v2/setup log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0dc44e7e8002 ot_span_id=037f0dc44e7e8001 ot_start=2019-03-05T05:00:42.169964Z ot_stop=2019-03-05T05:00:42.170122Z ot_duration=0.158ms
ts=2019-03-05T05:03:17.966771Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/setup status=200 duration_ns=31016
ts=2019-03-05T05:03:17.966818Z lvl=info msg=platform:/api/v2/setup log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0e5c73be8002 ot_span_id=037f0e5c73be8001 ot_start=2019-03-05T05:03:17.966665Z ot_stop=2019-03-05T05:03:17.966813Z ot_duration=0.149ms
ts=2019-03-05T05:03:52.223448Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=POST path=/api/v2/setup status=201 duration_ns=84383930
ts=2019-03-05T05:03:52.223469Z lvl=info msg=platform:/api/v2/setup log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0e7dd2be8002 ot_span_id=037f0e7dd2be8001 ot_start=2019-03-05T05:03:52.138982Z ot_stop=2019-03-05T05:03:52.223468Z ot_duration=84.486ms
ts=2019-03-05T05:06:57.131305Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/setup status=200 duration_ns=29643
ts=2019-03-05T05:06:57.131336Z lvl=info msg=platform:/api/v2/setup log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f327afe8002 ot_span_id=037f0f327afe8001 ot_start=2019-03-05T05:06:57.131235Z ot_stop=2019-03-05T05:06:57.131333Z ot_duration=0.099ms
ts=2019-03-05T05:07:53.412612Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/ status=200 duration_ns=7918398
ts=2019-03-05T05:07:53.412664Z lvl=info msg=platform:/ log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f696f3e8002 ot_span_id=037f0f696f3e8001 ot_start=2019-03-05T05:07:53.404612Z ot_stop=2019-03-05T05:07:53.412661Z ot_duration=8.049ms
ts=2019-03-05T05:07:53.589511Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/src.429f03fb.css status=200 duration_ns=145636428
ts=2019-03-05T05:07:53.589596Z lvl=info msg=platform:/src.429f03fb.css log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6978fe8002 ot_span_id=037f0f6978fe8001 ot_start=2019-03-05T05:07:53.443832Z ot_stop=2019-03-05T05:07:53.589590Z ot_duration=145.758ms
ts=2019-03-05T05:07:53.713264Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/src.79aedee0.js status=200 duration_ns=269295256
ts=2019-03-05T05:07:53.713297Z lvl=info msg=platform:/src.79aedee0.js log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6978fe8005 ot_span_id=037f0f6978fe8004 ot_start=2019-03-05T05:07:53.443866Z ot_stop=2019-03-05T05:07:53.713295Z ot_duration=269.429ms
ts=2019-03-05T05:07:53.799279Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/Roboto-Regular.f82a1950.ttf status=200 duration_ns=6886354
ts=2019-03-05T05:07:53.799307Z lvl=info msg=platform:/Roboto-Regular.f82a1950.ttf log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f69d03e8002 ot_span_id=037f0f69d03e8001 ot_start=2019-03-05T05:07:53.792340Z ot_stop=2019-03-05T05:07:53.799306Z ot_duration=6.965ms
ts=2019-03-05T05:07:54.245510Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2 status=200 duration_ns=53557
ts=2019-03-05T05:07:54.245552Z lvl=info msg=platform:/api/v2 log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a417e8002 ot_span_id=037f0f6a417e8001 ot_start=2019-03-05T05:07:54.245412Z ot_stop=2019-03-05T05:07:54.245550Z ot_duration=0.138ms
ts=2019-03-05T05:07:54.277712Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/setup status=200 duration_ns=35706
ts=2019-03-05T05:07:54.277751Z lvl=info msg=platform:/api/v2/setup log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a497e8002 ot_span_id=037f0f6a497e8001 ot_start=2019-03-05T05:07:54.277615Z ot_stop=2019-03-05T05:07:54.277748Z ot_duration=0.133ms
ts=2019-03-05T05:07:54.389719Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=401 duration_ns=99508 error=unauthorized error_code=X-Platform-Error-Code
ts=2019-03-05T05:07:54.389749Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a657e8002 ot_span_id=037f0f6a657e8001 ot_start=2019-03-05T05:07:54.389599Z ot_stop=2019-03-05T05:07:54.389747Z ot_duration=0.148ms
ts=2019-03-05T05:07:54.391213Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=401 duration_ns=33310 error=unauthorized error_code=X-Platform-Error-Code
ts=2019-03-05T05:07:54.391237Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a65fe8002 ot_span_id=037f0f6a65fe8001 ot_start=2019-03-05T05:07:54.391166Z ot_stop=2019-03-05T05:07:54.391235Z ot_duration=0.069ms
ts=2019-03-05T05:07:54.436069Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/setup status=200 duration_ns=30327
ts=2019-03-05T05:07:54.436111Z lvl=info msg=platform:/api/v2/setup log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a713e8002 ot_span_id=037f0f6a713e8001 ot_start=2019-03-05T05:07:54.436019Z ot_stop=2019-03-05T05:07:54.436107Z ot_duration=0.088ms
ts=2019-03-05T05:07:54.466873Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/auth-logo.63b44c2a.svg status=200 duration_ns=229698
ts=2019-03-05T05:07:54.466903Z lvl=info msg=platform:/auth-logo.63b44c2a.svg log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a78be8002 ot_span_id=037f0f6a78be8001 ot_start=2019-03-05T05:07:54.466613Z ot_stop=2019-03-05T05:07:54.466901Z ot_duration=0.288ms
ts=2019-03-05T05:07:54.592695Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/icomoon.e00c00cd.woff2 status=200 duration_ns=1032798
ts=2019-03-05T05:07:54.592741Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/favicon.fa749080.ico status=200 duration_ns=1104120
ts=2019-03-05T05:07:54.592756Z lvl=info msg=platform:/icomoon.e00c00cd.woff2 log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a97fe8002 ot_span_id=037f0f6a97fe8001 ot_start=2019-03-05T05:07:54.591544Z ot_stop=2019-03-05T05:07:54.592753Z ot_duration=1.209ms
ts=2019-03-05T05:07:54.592767Z lvl=info msg=platform:/favicon.fa749080.ico log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a97fe8005 ot_span_id=037f0f6a97fe8004 ot_start=2019-03-05T05:07:54.591555Z ot_stop=2019-03-05T05:07:54.592764Z ot_duration=1.209ms
ts=2019-03-05T05:07:54.593951Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/Roboto-Bold.95244466.ttf status=200 duration_ns=118474594
ts=2019-03-05T05:07:54.593982Z lvl=info msg=platform:/Roboto-Bold.95244466.ttf log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a7afe8002 ot_span_id=037f0f6a7afe8001 ot_start=2019-03-05T05:07:54.475432Z ot_stop=2019-03-05T05:07:54.593980Z ot_duration=118.548ms
ts=2019-03-05T05:07:54.698035Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/Roboto-Black.4c9983d4.ttf status=200 duration_ns=106556443
ts=2019-03-05T05:07:54.698080Z lvl=info msg=platform:/Roboto-Black.4c9983d4.ttf log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a80be8005 ot_span_id=037f0f6a80be8004 ot_start=2019-03-05T05:07:54.498304Z ot_stop=2019-03-05T05:07:54.698075Z ot_duration=199.771ms
ts=2019-03-05T05:07:54.698131Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/Roboto-Light.da232e33.ttf status=200 duration_ns=106666349
ts=2019-03-05T05:07:54.698155Z lvl=info msg=platform:/Roboto-Light.da232e33.ttf log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a80be8002 ot_span_id=037f0f6a80be8001 ot_start=2019-03-05T05:07:54.498051Z ot_stop=2019-03-05T05:07:54.698153Z ot_duration=200.102ms
ts=2019-03-05T05:07:54.706941Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/auth-bg.dfe11863.svg status=200 duration_ns=209633105
ts=2019-03-05T05:07:54.706985Z lvl=info msg=platform:/auth-bg.dfe11863.svg log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f6a807e8002 ot_span_id=037f0f6a807e8001 ot_start=2019-03-05T05:07:54.497269Z ot_stop=2019-03-05T05:07:54.706981Z ot_duration=209.712ms
ts=2019-03-05T05:08:04.982687Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=POST path=/api/v2/signin status=204 duration_ns=111691586
ts=2019-03-05T05:08:04.982716Z lvl=info msg=platform:/api/v2/signin log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74a1be8002 ot_span_id=037f0f74a1be8001 ot_start=2019-03-05T05:08:04.870926Z ot_stop=2019-03-05T05:08:04.982714Z ot_duration=111.788ms
ts=2019-03-05T05:08:05.004717Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=5555617
ts=2019-03-05T05:08:05.004761Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74c1fe8002 ot_span_id=037f0f74c1fe8001 ot_start=2019-03-05T05:08:04.999129Z ot_stop=2019-03-05T05:08:05.004758Z ot_duration=5.629ms
ts=2019-03-05T05:08:05.010443Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=2725980
ts=2019-03-05T05:08:05.010503Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74c3fe8002 ot_span_id=037f0f74c3fe8001 ot_start=2019-03-05T05:08:05.007695Z ot_stop=2019-03-05T05:08:05.010498Z ot_duration=2.803ms
ts=2019-03-05T05:08:05.032221Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/orgs status=200 duration_ns=1609289
ts=2019-03-05T05:08:05.032242Z lvl=info msg=platform:/api/v2/orgs log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74c9be8002 ot_span_id=037f0f74c9be8001 ot_start=2019-03-05T05:08:05.030590Z ot_stop=2019-03-05T05:08:05.032240Z ot_duration=1.650ms
ts=2019-03-05T05:08:05.055584Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/sources status=200 duration_ns=3294052
ts=2019-03-05T05:08:05.055610Z lvl=info msg=platform:/api/v2/sources log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74cf3e8002 ot_span_id=037f0f74cf3e8001 ot_start=2019-03-05T05:08:05.052260Z ot_stop=2019-03-05T05:08:05.055608Z ot_duration=3.348ms
ts=2019-03-05T05:08:05.131104Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/orgs status=200 duration_ns=3024614
ts=2019-03-05T05:08:05.131155Z lvl=info msg=platform:/api/v2/orgs log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74e23e8002 ot_span_id=037f0f74e23e8001 ot_start=2019-03-05T05:08:05.128045Z ot_stop=2019-03-05T05:08:05.131152Z ot_duration=3.107ms
ts=2019-03-05T05:08:05.134269Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/dashboards status=200 duration_ns=2127898
ts=2019-03-05T05:08:05.134305Z lvl=info msg=platform:/api/v2/dashboards log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74e33e8002 ot_span_id=037f0f74e33e8001 ot_start=2019-03-05T05:08:05.132115Z ot_stop=2019-03-05T05:08:05.134303Z ot_duration=2.188ms
ts=2019-03-05T05:08:05.166795Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/Roboto-Medium.7030d125.ttf status=200 duration_ns=7350632
ts=2019-03-05T05:08:05.166827Z lvl=info msg=platform:/Roboto-Medium.7030d125.ttf log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f74e9fe8002 ot_span_id=037f0f74e9fe8001 ot_start=2019-03-05T05:08:05.159415Z ot_stop=2019-03-05T05:08:05.166825Z ot_duration=7.410ms
ts=2019-03-05T05:08:08.788417Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/authorizations status=200 duration_ns=3543514
ts=2019-03-05T05:08:08.788527Z lvl=info msg=platform:/api/v2/authorizations log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f78743e8002 ot_span_id=037f0f78743e8001 ot_start=2019-03-05T05:08:08.784799Z ot_stop=2019-03-05T05:08:08.788515Z ot_duration=3.717ms
ts=2019-03-05T05:08:10.895940Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/RobotoMono-Medium.ed4bd09b.ttf status=200 duration_ns=7656032
ts=2019-03-05T05:08:10.895981Z lvl=info msg=platform:/RobotoMono-Medium.ed4bd09b.ttf log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0f7a823e8002 ot_span_id=037f0f7a823e8001 ot_start=2019-03-05T05:08:10.888241Z ot_stop=2019-03-05T05:08:10.895977Z ot_duration=7.736ms
ts=2019-03-05T05:09:05.327039Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=3344513
ts=2019-03-05T05:09:05.327106Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0fafaafe8002 ot_span_id=037f0fafaafe8001 ot_start=2019-03-05T05:09:05.323570Z ot_stop=2019-03-05T05:09:05.327102Z ot_duration=3.532ms
ts=2019-03-05T05:10:05.325936Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=3378051
ts=2019-03-05T05:10:05.326000Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f0fea42be8002 ot_span_id=037f0fea42be8001 ot_start=2019-03-05T05:10:05.322524Z ot_stop=2019-03-05T05:10:05.325993Z ot_duration=3.470ms
ts=2019-03-05T05:11:05.330592Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=3729304
ts=2019-03-05T05:11:05.330698Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f1024dbbe8002 ot_span_id=037f1024dbbe8001 ot_start=2019-03-05T05:11:05.326760Z ot_stop=2019-03-05T05:11:05.330691Z ot_duration=3.932ms
ts=2019-03-05T05:12:05.326065Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=3319750
ts=2019-03-05T05:12:05.326130Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f105f72be8002 ot_span_id=037f105f72be8001 ot_start=2019-03-05T05:12:05.322694Z ot_stop=2019-03-05T05:12:05.326125Z ot_duration=3.431ms
ts=2019-03-05T05:13:05.327765Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=3791982
ts=2019-03-05T05:13:05.327840Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f109a0afe8002 ot_span_id=037f109a0afe8001 ot_start=2019-03-05T05:13:05.323862Z ot_stop=2019-03-05T05:13:05.327835Z ot_duration=3.973ms
ts=2019-03-05T05:14:05.325095Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=3451309
ts=2019-03-05T05:14:05.325162Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f10d4a27e8002 ot_span_id=037f10d4a27e8001 ot_start=2019-03-05T05:14:05.321605Z ot_stop=2019-03-05T05:14:05.325157Z ot_duration=3.553ms
ts=2019-03-05T05:15:05.319933Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=2787200
ts=2019-03-05T05:15:05.319977Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f110f397e8002 ot_span_id=037f110f397e8001 ot_start=2019-03-05T05:15:05.317085Z ot_stop=2019-03-05T05:15:05.319973Z ot_duration=2.888ms
ts=2019-03-05T05:15:54.974485Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/labels status=200 duration_ns=2224973
ts=2019-03-05T05:15:54.974517Z lvl=info msg=platform:/api/v2/labels log_id=0D~3NlOG000 handler=platform ot_trace_id=037f113fb73e8002 ot_span_id=037f113fb73e8001 ot_start=2019-03-05T05:15:54.972230Z ot_stop=2019-03-05T05:15:54.974514Z ot_duration=2.284ms
ts=2019-03-05T05:16:05.000341Z lvl=debug msg=Request log_id=0D~3NlOG000 service=http handler=platform method=GET path=/api/v2/me status=200 duration_ns=2973888
ts=2019-03-05T05:16:05.000409Z lvl=info msg=platform:/api/v2/me log_id=0D~3NlOG000 handler=platform ot_trace_id=037f1149817e8002 ot_span_id=037f1149817e8001 ot_start=2019-03-05T05:16:04.997334Z ot_stop=2019-03-05T05:16:05.000403Z ot_duration=3.069ms
goller commented 5 years ago

@sebito91 Thanks for the report!

I'm not seeing anything obvious from the sections of code here:

https://github.com/influxdata/influxdb/blob/4c3679358b847f2d4a80f0d5b91aef504a82329a/cmd/influx/setup.go#L74 https://github.com/influxdata/influxdb/blob/6a8a1fce32ac4f9f5c6b13e51797ca4dcded46a9/cmd/influx/main.go#L67

Hmm, I'm grasping here, but, does /home/sborza/.influxdbv2 exist have have rwx perms?

sebito91 commented 5 years ago

The folder doesn't exist.

[sborza@icebox]:~:$ ls -ld ~/.influxdbv2
ls: cannot access '/home/sborza/.influxdbv2': No such file or directory
goller commented 5 years ago

@sebito91 ok now that's really interesting! Essentially, it tried to create a file without the directory being present. It's super weird to me that it didn't fail.

I'll update this issue title and get a PR rolled out!

sebito91 commented 5 years ago

Thanks @goller. Would have expected there to be an error similar to the example in ioutil so if it's indeed a failed write we should see that.

What about L12 in the code here? Seems like we could create the directory if it doesn't exist?

[sborza@icebox]:~/.../golang/src/paths (master %):$ go run main.go
2019/03/05 09:44:25 open /home/sborza/.influxdbv2/tester: no such file or directory
exit status 1
[sborza@icebox]:~/.../golang/src/paths (master %):$ cat main.go
package main

import (
        "io/ioutil"
        "log"
)

func main() {
        message := []byte("Hello, Gophers!")
        err := ioutil.WriteFile("/home/sborza/.influxdbv2/tester", message, 0644)
        if err != nil {
                log.Fatal(err)
        }
}
goller commented 5 years ago

@sebito91 Yeah.... I just tried the same example. Very confusing. I agree with your point on L12. Might as well add the create directory... did you want to add that line and see how it goes?

sebito91 commented 5 years ago

Sure, will do and get back to you.