-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another case of "Exception occurred in preexec_fn" when running as non-root-user #1527
Comments
JupyterHub doesn't user a per-user Try making a virtualenv outside the user's home directory and installing JupyterHub there, then verify that all users can read and run those files. It still can be in the home directory, but do verify that all users can launch Python in that env. However, the error in your log suggests that perhaps sudospawner isn't being used, instead it looks like the default LocalProcessSpawner is being used. Can you share your jupyterhub_config.py as well? |
Thanks for your response. Right now my jupyterhub_config.py is nothing but comments (I forget the jupyterhub option to generate one, but that's all I've done plus moving it to /etc/jupyterhub. I've seen postings about invoking jupyterhub with --JupyterHub.spawner_class=sudospawner.SudoSpawner and I've tried that, but when I do and try to log into jupyterhub as user1 this happens:
Yet user1 can shell in and go "sudo -u juphub sudo -n -u $USER /home/juphub/.local/bin/sudospawner --help" and ti works. |
UPDATE: It's a long story but I was just now able to get user1's login to work. |
I was disappointed to find that this was closed without elaboration after the user solved their problem. Others of us that have the exact same problem are looking for an answer or direction of some sort. Having the shell sudospawner call working through the sudo redirects is a good sign that we are just a couple of configuration steps away from getting this to work. It's likely that it's not enough to just set the spawner_class, but also set the spawner cmd call in jupyterhub_config.py: c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner' This conduit will allow a non-privileged user to perform a single-user spawn via sudospawner. |
I echo rcasey-iris, I am having the same issue here, I hope there would be an official and more elegant solution on this issue, but I am not sure if this "closed" issue would even get attention, anyway, I hope so. |
same issue here on a fresh U18.04 install. I have my old 16.04 working configuration at hand, but I get the exact same error as @MincingWords never mind: my sudospawner was not executable by the jupyterhub user |
How to reproduce the issue
Execute './jupyterhub" in ~/.local/bin as non-root user
What you expected to happen
Not get 500 errors when regular user logs into jupyterhub
What actually happens
get 500 errors when regular user logs into jupyterhub
Share what version of JupyterHub you are using
0.8.1
Running
jupyter troubleshoot
from the command line, if possible, and postingits output would also be helpful.
[NOTE: user1 ran "./jupyter troubleshoot" in ~/.local/bin]
Here is the log output of jupyterhub when user1 tries to log in:
Gentoo Linux is a little odd in that it doesn't let regular users or root run pip install globally; it has to be run with --user on the end so that package files wind up in ~/.local. My user "juphub" is your "rhea" and "user1" is your "zoe" or "wash". So juphub has run pip install jupyterhub and so forth. In /home/user1 we have this:
and /home/juphub/.local and contents are chmodded 755 except for /home/juphub/.local/bin/jupyterhub_cookie_secret which is 700.
In /etc/sudoers I have this:
/etc/group contains
User user1 can execute "sudo -u juphub sudo -n -u $USER /home/juphub/.local/bin/sudospawner --help" and it works.
The text was updated successfully, but these errors were encountered: