Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid Credentials" when using password #717

Closed
agupta231 opened this issue Sep 16, 2018 · 3 comments
Closed

"Invalid Credentials" when using password #717

agupta231 opened this issue Sep 16, 2018 · 3 comments
Labels

Comments

@agupta231
Copy link

@agupta231 agupta231 commented Sep 16, 2018

Good evening,

I am using datascience-notebook and trying to use password authentication instead of token auth. I am starting my instance with the command:

docker run --rm -d --name jupyter -p 8888:8888 -v `pwd`:/home/jovyan/cs534 jupyter/datascience-notebook

When accessing localhost:8888, I am greeted with the following screen:

screen shot 2018-09-15 at 11 27 57 pm

And I can login!

However, when I try to login with the same password again, I get an "Invalid Credentials" error, as shown below:

screen shot 2018-09-15 at 11 28 15 pm

I've looked into the logs, and the .json file seems to be getting written to. I even ran jupyter notebook password with no avail.

I probably just messed up my docker command, but any help would be greatly appreciated.

@gshau

This comment has been minimized.

Copy link

@gshau gshau commented Sep 26, 2018

I'm can confirm the same issue with tensorflow-notebook.

@parente

This comment has been minimized.

Copy link
Member

@parente parente commented Sep 27, 2018

After entering the token and my desired password, and then looking in the container I see:

jovyan@1239db1889fb:~/.jupyter$ cat jupyter_notebook_config.json
{
  "NotebookApp": {
    "password": "sha1:d4fb03e677bf:565c02659323fcf7d294b0713a02b73ae09fab29"
  }

When I logout and back in again, I agree, my desired password does not work. However, the notebook server only reads its configuration files on startup, so I'd expect the password to only take effect on the next notebook server start. In an ephemeral container without a persistent volume mount, the configuration will be lost as soon as the notebook server shuts down.

Proving this out with a host volume mount:

mkdir -p /tmp/home/.jupyter
cd /tmp/home/
docker run --rm -it --user root -p 8888:8888 -e NB_UID=$(id -u) -v `pwd`:/home/jovyan jupyter/datascience-notebook

# Visit localhost:8888
# Enter the token and my desired password in the browser
# Ctrl-C to shutdown the container

# Run the container again
docker run --rm -it --user root -p 8888:8888 -e NB_UID=$(id -u) -v `pwd`:/home/jovyan jupyter/datascience-notebook

# Visit localhost:8888
# See only the password login box now
# Password works
@agupta231

This comment has been minimized.

Copy link
Author

@agupta231 agupta231 commented Sep 30, 2018

That works!

Adding the .jupyter folder and restarting twice seemed to have done the trick. I believe that my issue came from the fact that I wasn't mounting my working directory to the home folder of the jouyan user.

Cheers!

@agupta231 agupta231 closed this Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.