服务器上的其他用户无法打开 JupyterHub



我花了很多时间尝试我在网上找到的几个解决方案来解决这个问题。什么都没用。

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"

首先我得到了这个——

[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.

所以,我用这个更新了我的配置——

c.PAMAuthenticator.open_sessions = False

第一个错误消失了,但我仍然得到这个 -

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.

任何帮助将不胜感激。

试试这个:

创建组:

$ sudo groupadd <groupname>

将用户添加到组:

$ sudo adduser <username> <groupname>

检查组成员:

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

[jupyterhub_config.py]

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

我给你留下我的github教程: 吉图布/朱皮特

我相信您正在以普通用户身份运行JupyterHub进程,而对于多个用户设置,您需要它以超级用户身份运行。

最新更新