skip to Main Content

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


  1. Try this:

    Create a group:

    $ sudo groupadd <groupname>
    

    Add a user to a group:

    $ sudo adduser <username> <groupname>
    

    Check group members:

    $ sudo apt install members -y
    $ members <groupname>
    

    [jupyterhub_config.py]

    c.LocalAuthenticator.group_whitelist = ['<groupname>']
    

    I leave you my github with a tutorial:
    Gitub/Jupyter

    Login or Signup to reply.
  2. I believe you are running the JupyterHub process as a normal user while for multiple user setups you need it to run as superuser.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search