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

时间:2020-01-23 00:44:34

标签: linux centos anaconda jupyter-lab 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.

任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:1)

尝试一下:

创建一个组:

$ sudo groupadd <groupname>

将用户添加到组:

$ sudo adduser <username> <groupname>

检查组成员:

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

[jupyterhub_config.py]

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

我给我我的github一个教程: Gitub/Jupyter

答案 1 :(得分:0)

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