takluyver / nbopen

Open a Jupyter notebook in the best available server
BSD 3-Clause "New" or "Revised" License
301 stars 58 forks source link

nbopen asks for token/password, even when using an existing server that is already authenticated --- and jupyter notebook list does not show the required tokens #77

Closed michaelerule closed 2 years ago

michaelerule commented 2 years ago

nbopen asks for token/password, even when using an existing server that is already authenticated --- and jupyter notebook list does not show the required tokens. I'm running Ubuntu 20.04:

> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
> python3 --version
Python 3.8.10
> python2 --version
Python 2.7.18
> jupyter-lab --version
3.2.5 

If I start a new notebook server, using

jupyter lab

I can view/create/edit notebooks from my browser. I am not asked for a password or token. If I run

nbopen MY_NOTEBOOK.ipynb

The consol prints

> Using existing server at /home/mer49

I am then brought to a page that asks for a password or token login. It suggests typing jupyter notebook list. If I run this command, I see the instance of jupyter lab that I started earlier, and it's associated token. However, this token does not work for access the notebook/page opened by nbopen. If you copy the token over, it will not authorize access.

If I start nbopen without first starting jupyter, I encounter the same problem, only this time jupyter notebook list shows no active notebook servers.

michaelerule commented 2 years ago

I enabled password-based login and rebooted the machine; This seems to have fixed things for now.