notebook: Cannot list running notebook with --allow-root
Several command patterns are tried, but none of them succeeds. How may ‘root’ list the running notebooks?
Case 1
> jupyter --allow-root notebook list
No such file or directory: /root/notebook
Case 2
> jupyter notebook --allow-root list
No such file or directory: /root/list
Case 3
> jupyter notebook list --allow-root
CRITICAL | Unrecognized flag: '--allow-root'
I’m using jupyter notebook 5.0.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 9
- Comments: 32 (11 by maintainers)
Hi,
Have you tried to pass this flag last? Like so:
It worked for me.
if you need the token for loggin into a notebook which is run in a docker container, and you no longer have the terminal where it was outputted when you did
docker run
(ordocker start
), then you can use the docker logs to recover that token. These capture all terminal output as if you were seeing it live.Just run
docker logs <container-name> | less
and search (/
) fortoken=
@gnestor Yes, that’s right.
I’m running Jupyter Notebook in a custom Docker container in fact. It is installed with miniconda. Thus, running it locally or remotely is irrelevant. I am executing the commands as root (UID
0
) however. I’m currently enforcing a previous version to fix the issue.I’m happy to make a special Docker container image build with the newest Jupyter Notebook version installed if preferred, so you can give it a try 😃
That one’s a bug -
--allow-root
shouldn’t be necessary for setting a password. It’s been fixed (#2421), but the fix isn’t in a release yet. It should be in notebook 5.1 when we release that soon.In the meantime, I think you can run Python code to set a password like this:
As in, you run
jupyter notebook --allow-root
.Thanks, it worked for me, too.
I solved the
jupyter notebook list
error by upgrading the jupyter notebook to the (most) recent version (4.4.0):pip install --upgrade notebook
Here is the solution, open terminal and run it as root@localhost# and type “jupyter notebook --allow-root” there you go! Give it a try and see the magic happen.
I am having the same problem. @thomasopsomer If you are trying to list running notebooks just to retrieve password, it is visible when you do docker logs command.