Tests are failing for jupyterhub/tests/test_singleuser.py::test_singleuser_auth
.
The error I get is:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:50879/@/space%20word/user/nandy/tree
Git Clone URL: | https://aur.archlinux.org/jupyterhub.git (read-only, click to copy) |
---|---|
Package Base: | jupyterhub |
Description: | Multi-user server for Jupyter notebooks |
Upstream URL: | https://jupyter.org/hub |
Licenses: | BSD |
Submitter: | xantares |
Maintainer: | bcb |
Last Packager: | bcb |
Votes: | 8 |
Popularity: | 0.001188 |
First Submitted: | 2015-03-12 14:00 (UTC) |
Last Updated: | 2022-03-19 09:27 (UTC) |
Tests are failing for jupyterhub/tests/test_singleuser.py::test_singleuser_auth
.
The error I get is:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:50879/@/space%20word/user/nandy/tree
@leuko -- I've made that change in the latest version, thanks for reporting it.
Got an error during compilation:
...
[C 2022-01-22 16:22:58.736 JupyterHub application:91] The 'answer_yes' trait of a JupyterHub instance must be a boolean, but a value of 'true' <class 'str'> was specified.
...
Can be fixed by replacing -y=true
with -y True
I still get two errors during tests, but I will look at them later.
Thanks for this wonderful package bcb!
thanks for the tip @tinux -
comm -12 <(pactree -u jupyterhub | sort ) <(pacman -Slq aur | sort)
where 'aur' is my local repository of built aur packages
returned:
nodejs-configurable-http-proxy python-certipy python-jupyter_telemetry python_pamela
Rebuilding those got me through!
pacman -Qo /usr/lib/python3.9
will give you the names of packages with files still in the old Python directory.
For future reference, packages in depends
are also installed for the build, so adding python-jupyter_telemetry
to makedepends
would be redundant when it is already in depends
.
Sorry on phone here...
I got this to work. You need to recompile required AUR packages because of the change to python-3.10. I don't remember which though, but it's easy to find out (on a computer).
building this in a clean chroot I'm getting missing jupyter_telemetry
- adding it to the makedepends didn't help. I'll dig a little deeper
creating build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/19c0846f6344_base_revision_for_0_5.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/1cebaf56856c_session_id.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/3ec6993fe20c_encrypted_auth_state.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/4dc2d5a8c53c_user_options.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/56cc5a70207e_token_tracking.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/833da8570507_rbac.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/896818069c98_token_expires.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/99a28a4418e1_user_created.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/af4cbdb2d13c_services.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/d68c98b66cd4_client_description.py -> build/lib/jupyterhub/alembic/versions
copying jupyterhub/alembic/versions/eeb276e51423_auth_state.py -> build/lib/jupyterhub/alembic/versions
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/build/jupyterhub/src/jupyterhub-2.0.0/build/lib/jupyterhub/__main__.py", line 1, in <module>
from .app import main
File "/build/jupyterhub/src/jupyterhub-2.0.0/build/lib/jupyterhub/app.py", line 74, in <module>
from jupyter_telemetry.eventlog import EventLog
ModuleNotFoundError: No module named 'jupyter_telemetry'
==> ERROR: A failure occurred in build().
Note that version upgrades may require you to upgrade the database before the new version will start. Always check the documentation, in particular the changelog before upgrading.
I have just updated the package to 2.0.0. I have included a patch which changes some of the tests to use random ports so they will not fail if you already have a JupyterHub server running. A handful of tests are disabled because they are not compatible with this patch or I couldn't find a way to make them work with random port numbers. When I get time I will try to work with upstream to get the tests modified properly for this.
This package is already marked out of date, but FYI, 2.0.0 is now out too: https://github.com/jupyterhub/jupyterhub/releases/tag/2.0.0
found the source :D
My Jupyterhub instance was already running on port 8000, so most of the tests failed. Maybe a short warning could be useful, what do you think @bcb?
Thank you for testing out @bcb! I just tried on another machine, and it works.
On my server somehow most of the tests fail, but makepkg --nocheck
works. I will compare the build logs then. You do not have to wait for me, thanks :J
@leuko: The tests (including the one you mentioned) pass on two different machines for me, including in a clean chroot with just the package dependencies. It could be an interaction with another package you have installed I guess. Does jupyterhub run if you skip the checks (makepkg --nocheck
)? Can you you upload the full build log from one of these failures to a pastebin and post the link here?
And thanks for pointing out the pycurl optional dependency. I'll add it to the PKGBUILD -- I'll wait a little while before I upload a new PKGBUILD in case we can figure out something for the check failures in the same upload.
I get a lot of errors during check()
, e.g.,
jupyterhub/tests/test_proxy.py::test_add_get_delete[host.name/path/] ERROR
and many tornado.httpclient.HTTPClientError: HTTP 403
errors. Does someone else have this problem?
python-pycurl
seems to be an optional dependency
@lonaowna glad it wasn't too hard to solve. I've started a wiki page at https://wiki.archlinux.org/index.php/JupyterHub and have added some details about file permissions to the section on the PAM authenticator.
@bcb spot on! Turns out my /etc/shadow
had permissions 000
instead of 600
. No idea how that happened. After fixing that, jupyterhub works with just CAP_SETUID CAP_SETGID
. Thanks so much!
So its a file permissions problem. What are the file permissions on /etc/shadow
? It needs to be able to read that to check the password.
The PAM authenticator uses the pamela library to perform the authentication, and the library can be used from the command line. If you do sudo su -
to get a root shell, and then python -m pamela -a <regular username>
in that root shell, does the authentication succeed?
@bcb: I'm just using jupyterhub.service
as provided by you, so that runs as root. When logging in, I use my regular non-root user.
I've been trying some other capabilities, and CAP_DAC_OVERRIDE
seems to work. That seems to be a pretty broad capability though. I'm not sure if there is another, more specific one, that would also do the trick. Any suggestions?
@lonaowna: are you running the server as root or as a non-root user?
Removing the line removes all capability restrictions -- its not that CAP_SETUID and CAP_SETGID are wrong, but that there is at least one more capability needed in that line.
@bcb: thanks for taking over maintainership, and adding the service file!
Unfortunately, I can't use jupyterhub with your service file. This seems to be caused by the following line:
CapabilityBoundingSet=CAP_SETUID CAP_SETGID
With this line in the service file, I can't log in: it shows Invalid username or password
in the web interface and jupyterhub[5696]: [JupyterHub auth:1042] PAM Authentication failed: [PAM Error 6] Permission denied
in the journal.
If I remove the line, it works fine.
Thank you for this convenient package! We could also integrate a Jupyterhub systemd service. What do you think?
Package is no longer broken
this package is broken go for juyterhub-git
Imade yay -S jupyterhub then sudo jupyterhub and i get: Traceback (most recent call last): File "/usr/bin/jupyterhub", line 3, in <module> from jupyterhub.app import main File "/usr/lib/python3.7/site-packages/jupyterhub/app.py", line 57, in <module> from .oauth.store import make_provider File "/usr/lib/python3.7/site-packages/jupyterhub/oauth/store.py", line 13, in <module> from oauth2 import Provider ImportError: cannot import name 'Provider' from 'oauth2' (/usr/lib/python3.7/site-packages/oauth2/init.py)
@danielfm123 This may be a configuration problem. Look over jupyter_notebook_config.py
I just cant make it work... i just want it to work with local users, but i get this error...
[dfischer@ativ8 jupyterlab]$ jupyterhub Traceback (most recent call last): File "/usr/bin/jupyterhub", line 3, in <module> from jupyterhub.app import main File "/usr/lib/python3.7/site-packages/jupyterhub/app.py", line 57, in <module> from .oauth.store import make_provider File "/usr/lib/python3.7/site-packages/jupyterhub/oauth/store.py", line 13, in <module> from oauth2 import Provider ImportError: cannot import name 'Provider' from 'oauth2' (/usr/lib/python3.7/site-packages/oauth2/init.py)
i dont even want oauth
Thanks for maintaining this. Just wanted to tell that I had to install python-async_generator (community) and python-oauth2 (through pip) before getting to run the latest version (0.9.2-1). Cheers
Pinned Comments
bcb commented on 2021-12-05 16:27 (UTC)
Note that version upgrades may require you to upgrade the database before the new version will start. Always check the documentation, in particular the changelog before upgrading.