jupyter / docker-stacks

Ready-to-run Docker images containing Jupyter applications
https://jupyter-docker-stacks.readthedocs.io
Other
8k stars 2.99k forks source link

[BUG] - Generating new user for token-authenticated request keeps appearing when token auth is disabled #1892

Closed ahlag closed 1 year ago

ahlag commented 1 year ago

What docker image(s) are you using?

pyspark-notebook

Host OS system and architecture running docker image

MacOS

What Docker command are you running?

Running these with docker compose - docker compose up.

version: '3'
services:
  jupyter:
    image: jupyter/pyspark-notebook
    ports:
      - "8888:8888"
    volumes:
      - ./notebooks:/home/jovyan/work/notebooks
    command: "start.sh jupyter lab --NotebookApp.token='' --NotebookApp.password=''"
    networks:
      - network

networks:
  network:
    name: network

How to Reproduce the problem?

  1. Run docker compose up in the directory that has the above yaml.

Command output

Connecting to kernel e9c0749c-006d-4e25-bc82-77cbf5dc9d0c.
Connecting to kernel e9c0749c-006d-4e25-bc82-77cbf5dc9d0c.
Connecting to kernel e9c0749c-006d-4e25-bc82-77cbf5dc9d0c.
Generating new user for token-authenticated request: 7b68a45cafb241cca9084ff2f8f01622
Generating new user for token-authenticated request: 691150522f9d472abc41be4d553229bd
Generating new user for token-authenticated request: 96bc5cde3369469a8c0d304f2ca34c1e


### Expected behavior

We do not want Generating new user for token-authenticated request: 96bc5cde3369469a8c0d304f2ca34c1e to appear.

### Actual behavior

Generating new user for token-authenticated request: keeps appearing.

### Anything else?

_No response_

### Latest Docker version

- [X] I've updated my Docker version to the latest available, and the issue still persists
mathbunnyru commented 1 year ago

@ahlag could you please check, that you have this problem if you don't use our docker images? (just run jupyter lab on the host machine) If you still have the problem, it would be better to create an issue in the upstream project. I've also found where this line comes from: https://github.com/jupyter-server/jupyter_server/blob/main/jupyter_server/auth/identity.py#L478

It also might be an expected behaviour, I'm not sure about this.

ahlag commented 1 year ago

@mathbunnyru Yes, I was able to replicate this on jupyterlab. Is there a way to mute the logs coming from the docker container?

100kimch commented 1 year ago

@mathbunnyru I found this problem too when I use image jupyter/datascience-notebook.

When I build custom image based on jupyter/datascience-notebook, I use this:

FROM jupyter/datascience-notebook:latest

...

ENV JUPYTER_TOKEN=${TOKEN}
mathbunnyru commented 1 year ago

I'm closing this issue because the original problem is in upstream here: https://github.com/microsoft/vscode-jupyter/issues/13345 Please, use this issue, if you have additional information/thoughts.

The workaround can be found here: https://github.com/jupyter-server/jupyter_server/issues/1245#issuecomment-1508128514

mathbunnyru commented 1 year ago

This seems to be fixed in the upstream.