Closed andig closed 5 years ago
Update: the same happens when starting with brand-new container and data/config cleaned:
docker run -d -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-alpha
docker run --network=host quay.io/influxdb/influxdb:2.0.0-alpha influx setup
Please type your primary username:
Please type your primary username:
...
@andig I tried to reproduce just now with:
docker run --name influxd -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-alpha
and
docker exec -it influxd influx setup
docker exec -it influxd influx setup
Welcome to InfluxDB 2.0!
Please type your primary username: goller
Please type your password:
Please type your password again:
Please type your primary organization name: goller
Please type your primary bucket name: goller
Please type your retention period in hours.
Or press ENTER for infinite.:
You have entered:
Username: goller
Organization: goller
Bucket: goller
Retention Period: infinite
Confirm? (y/n): y
Your token has been stored in /root/.influxdbv2/credentials.
User Organization Bucket
goller goller goller
Perhaps it has something to do with localhost binding or --network=host.
Would you try how I did it with an exec into the container?
Regarding the loop of username, here is the code:
310 for {
311 line, err := ui.Ask(prompt, option)
312 switch err {
313 case input.ErrInterrupted:
314 os.Exit(1)
315 default:
316 if line = strings.TrimSpace(line); line == "" {
317 continue
318 }
319 return line
320 }
321 }
Certainly, there needs to be a case for the error being nil. The error is hidden behind the default switch case. I suspect what you are running into is that your
❯ docker run quay.io/influxdb/influxdb:2.0.0-alpha influx setup --host 'http://nas:9999'
needs -it
to make it an interactive terminal. Try out -it
.
There needs to be a check when err == nil then return the line.
needs -it to make it an interactive terminal. Try out -it.
Oh dear, of course. The root problems remains though: fresh alpha 5 web UI doesn't offer setup steps as alpha 4 did, see screenshot in issue.
Furthermore, once setup
has been run from command line instead of web UI, repl is unable to login:
❯ docker run quay.io/influxdb/influxdb:2.0.0-alpha influx setup --host 'http://nas:9999'
...
You have entered:
Username: root
Organization: org
Bucket: volkszaehler
Retention Period: infinite
Confirm? (y/n): y
Your token has been stored in /root/.influxdbv2/credentials.
User Organization Bucket
root org volkszaehler
❯ docker run quay.io/influxdb/influxdb:2.0.0-alpha influx repl --host 'http://nas:9999' --org org
Error: Unable to find organization: FindOrganization: <unauthorized> unauthorized access.
Usage:
influx repl [flags]
It feels I'm doing something horribly wrong but I can't find what?
@andig I'll try to reproduce the web UI setup problems.
As for the repl
giving you unauthorized access, that is because your docker setup is placing the credentials file inside the container. When you the repl you will have a different docker container that does not have that file.
You could volume mount /root/.influxdbv2
in both your influx setup and your influx repl to something on the docker host in order preserve the file.
@andig when you were setting up, did you remove ~/.influxdbv2
directory or ~/.influxdbv2/influxd.bolt
?
No. I‘m using docker and see this behavior with a brand-new container wirhout any volumes mounted.
@andig I was able to replicate this issue on my machine. It seemed like it was a scrollbar issue that wouldn't display the admin fields.
I updated my Chrome browser and after hard reload I was able to see all the admin fields.
Do you have the latest version of Chrome or the browser you are using?
@andig can you provide what browser and OS you are using access the ui?
I can confirm it works fine on chrome (sorry I didn't suspect this cause earlier- a4 worked just fine). The problems are with Safari on OSX.
Closing in favour of #12551
I'm running alpha versions on docker:
After upgrading alpha 4 to 5 I'm stuck at the 2nd step of the login screen:
Logs show that influx is running, but clients cant connect:
The last line keeps repeating. This is happening although alpha4 had bee successfully setup and running.