Closed astro-arphid closed 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
I recommend strongly against downgrading to 0.14. The issue is with 1b83c2738f4a3fa34b5242da9cb098a04901e6dc which fixes GHSA-cg54-gpgr-4rm6, which, as can be seen in the log, uses RuntimeDirectory=
, that was only introduced in systemd v228.
I know the appeal of CentOS is to get updates until the end of time (or nowadays until the end of this year), but using software this outdated is somewhat problematic. Users of CentOS at scale do backport some packages to keep it usable, I recommend having a look at Facebook's rpm-backports
@behrmann Appreciate the advice, thanks! We're in a bit of a tight position at the moment. Plans were to upgrade, but recent events with CentOS have, like with many other orgs, raised cause for concern and put a halt on that while we figure out what the best path is going forward.
Unfortunately downgrading was the only way I could get this working, and now I see why. I'm not going live with this yet as ideally would like to be running the most recent supported version. systemdspawner is the least complex option for implementing resource restrictions against JupyterHub users, something that wasn't so much of an issue pre-pandemic, but now that everyone is working from home and most users don't have the functionality to run Jupyter*... we're a bit pushed.
I'll take a look. Thanks!
I can confirm this issue.
My system
Also, downgrading to 0.14 solves the issue.
journalctl
Mar 02 19:52:49 jh jupyterhub[2280]: [I 2021-03-02 19:52:49.903 JupyterHub base:757] User logged in: tux Mar 02 19:52:49 jh jupyterhub[2280]: [I 2021-03-02 19:52:49.906 JupyterHub log:181] 302 POST /hub/login?next= -> /hub/spawn (tux@193.175.248.18) 28.38ms Mar 02 19:52:50 jh jupyterhub[2280]: Unknown assignment RuntimeDirectoryMode=700. Mar 02 19:52:50 jh jupyterhub[2280]: Failed to create bus message: Invalid argument Mar 02 19:52:50 jh jupyterhub[2280]: [I 2021-03-02 19:52:50.989 JupyterHub log:181] 302 GET /hub/spawn -> /hub/spawn-pending/tux (tux@193.175.248.18) 1> Mar 02 19:52:51 jh jupyterhub[2280]: [I 2021-03-02 19:52:51.070 JupyterHub pages:402] tux is pending spawn Mar 02 19:52:51 jh jupyterhub[2280]: [I 2021-03-02 19:52:51.098 JupyterHub log:181] 200 GET /hub/spawn-pending/tux (tux@193.175.248.18) 31.93ms Mar 02 19:52:59 jh jupyterhub[2280]: [W 2021-03-02 19:52:59.987 JupyterHub base:1006] User tux is slow to start (timeout=10) Mar 02 19:53:50 jh jupyterhub[2280]: [W 2021-03-02 19:53:50.032 JupyterHub user:683] tux's server failed to start in 60 seconds, giving up Mar 02 19:53:50 jh jupyterhub[2280]: [E 2021-03-02 19:53:50.078 JupyterHub gen:624] Exception in Future <Task finished coro=
Mar 02 19:53:50 jh jupyterhub[2280]: Traceback (most recent call last): Mar 02 19:53:50 jh jupyterhub[2280]: File "/opt/jupyterhub/lib64/python3.6/site-packages/tornado/gen.py", line 618, in error_callback Mar 02 19:53:50 jh jupyterhub[2280]: future.result() Mar 02 19:53:50 jh jupyterhub[2280]: File "/opt/jupyterhub/lib64/python3.6/site-packages/jupyterhub/handlers/base.py", line 902, in finish_user_s> Mar 02 19:53:50 jh jupyterhub[2280]: await spawn_future Mar 02 19:53:50 jh jupyterhub[2280]: File "/opt/jupyterhub/lib64/python3.6/site-packages/jupyterhub/user.py", line 707, in spawn Mar 02 19:53:50 jh jupyterhub[2280]: raise e Mar 02 19:53:50 jh jupyterhub[2280]: File "/opt/jupyterhub/lib64/python3.6/site-packages/jupyterhub/user.py", line 606, in spawn Mar 02 19:53:50 jh jupyterhub[2280]: url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f) Mar 02 19:53:50 jh jupyterhub[2280]: tornado.util.TimeoutError: Timeout
This also occurs on Ubuntu 16.04 LTS and other similarly old systemd versions. Luckily that reaches end of support next month, so not too much to do there.
For openSUSE Leap 15.2 which has systemd version 234 I got it to work by commenting the following two lines:
Now the folder is world-readable, however, the env file is not - so I guess that is fine?
drwxr-xr-x 2 mathause wheel /run/jupyter-mathause-singleuser
-r-------- 1 root root /run/jupyter-mathause-singleuser/jupyter-mathause-singleuser.env
It seems to have survived a restart but I have not thoroughly tested this.
Bug description
Unable to spawn user sessions using jupyterhub-systemdspawner==0.15.0.
I noticed that 0.14.0 is the latest listed under releases on the repository, so downgraded to that, which allows user instances to spawn with the same parameters configured.
I believe that this entry from the logs below is part of the problem, which was resolved under #9.
Expected behaviour
User sessions should spawn instead of timing out.
Actual behaviour
Users see the below when logging in:
How to reproduce
Your personal set up
uname -r
3.10.0-1160.15.2.el7.x86_64
python --version
Python 3.8.6
pip list
jupyterhub 1.3.0 jupyterhub-systemdspawner 0.15.0 jupyterlab 2.2.5
pip freeze
alembic==1.5.4 anyio==2.1.0 appdirs==1.4.4 argon2-cffi==20.1.0 async-generator==1.10 attrs==20.3.0 Babel==2.9.0 backcall==0.2.0 bleach==3.3.0 certifi==2020.12.5 certipy==0.1.3 cffi==1.14.4 chardet==4.0.0 cryptography==3.4.4 decorator==4.4.2 defusedxml==0.6.0 distlib==0.3.1 entrypoints==0.3 filelock==3.0.12 idna==2.10 ipykernel==5.4.3 ipython==7.20.0 ipython-genutils==0.2.0 jedi==0.18.0 Jinja2==2.11.3 json5==0.9.5 jsonschema==3.2.0 jupyter-client==6.1.11 jupyter-core==4.7.1 jupyter-server==1.3.0 jupyter-telemetry==0.1.0 jupyterhub==1.3.0 jupyterhub-systemdspawner==0.15.0 jupyterlab==2.2.5 jupyterlab-pygments==0.1.2 jupyterlab-server==1.2.0 Mako==1.1.4 MarkupSafe==1.1.1 mistune==0.8.4 nbclassic==0.2.6 nbclient==0.5.2 nbconvert==6.0.7 nbformat==5.1.2 nest-asyncio==1.5.1 notebook==6.2.0 oauthlib==3.1.0 packaging==20.9 pamela==1.0.0 pandocfilters==1.4.3 parso==0.8.1 pexpect==4.8.0 pickleshare==0.7.5 prometheus-client==0.9.0 prompt-toolkit==3.0.14 ptyprocess==0.7.0 pycparser==2.20 Pygments==2.7.4 pyOpenSSL==20.0.1 pyparsing==2.4.7 pyrsistent==0.17.3 python-dateutil==2.8.1 python-editor==1.0.4 python-json-logger==2.0.1 pytz==2021.1 pyzmq==22.0.2 requests==2.25.1 ruamel.yaml==0.16.12 ruamel.yaml.clib==0.2.2 Send2Trash==1.5.0 six==1.15.0 sniffio==1.2.0 SQLAlchemy==1.3.23 terminado==0.9.2 testpath==0.4.4 tornado==6.1 traitlets==5.0.5 urllib3==1.26.3 virtualenv==20.0.31 wcwidth==0.2.5 webencodings==0.5.1
Logs
journalctl
/var/log/jupyterhub.log