Closed sebito91 closed 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?
The folder doesn't exist.
[sborza@icebox]:~:$ ls -ld ~/.influxdbv2
ls: cannot access '/home/sborza/.influxdbv2': No such file or directory
@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!
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)
}
}
@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?
Sure, will do and get back to you.
Running the
influx setup
from CLI on v2.0.0-alpha4 doesn't render thecredentials
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.OS
EXTRA LOGS