I have spent a lot of time trying out the few solutions I found online to solve this. Nothing worked.
Install Location:
anaconda : /opt/anaconda
Run JupyterHub
$ cd /opt/anaconda/ <-- I have my jupyter_config.py here
$ jupyterhub --Spawner.cmd="/opt/anaconda/bin/jupyterhub_singleuser"
First I got this –
[W JupyterHub auth:956] Failed to open PAM session for user1: [PAM Error 14] Cannot make/remove an entry for the specified session
[W JupyterHub auth:957] Disabling PAM sessions from now on.
[I JupyterHub spawner:1417] Spawning /opt/anaconda/bin/jupyterhub_singleuser --port=27699
Failed to set groups [Errno 1] Operation not permitted
[E JupyterHub user:640] Unhandled error starting user1's server: Exception occurred in preexec_fn.
So, I updated my config with this –
c.PAMAuthenticator.open_sessions = False
The first error disappeared but I still get this –
Spawning /opt/anaconda/bin/jupyterhub_singleuser --port=62001
Failed to set groups [Errno 1] Operation not permitted
[E JupyterHub user:640] Unhandled error starting user1's server: Exception occurred in preexec_fn.
[W JupyterHub web:1782] 500 GET /hub/spawn (::ffff:10.2.139.158): Error in Authenticator.pre_spawn_start: SubprocessError Exception occurred in preexec_fn.
Any help will be appreciated.
2
Answers
Try this:
Create a group:
Add a user to a group:
Check group members:
[jupyterhub_config.py]
I leave you my github with a tutorial:
Gitub/Jupyter
I believe you are running the JupyterHub process as a normal user while for multiple user setups you need it to run as superuser.