Jupyterhub:许可错误:[Errno 13] 拒绝许可:'jupyterhub-proxy.pid'

2024-04-19 05:47:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在Linux服务器上安装Jupyterhub。 所以我有sudo的权利,但我不是根。 我已经配置了JupyterHub并且它是config,所以我可以在单用户模式下运行它(也可以从不同的文件夹)。你知道吗

但我在尝试启动多用户系统时出现以下错误: official documentation link。你知道吗

我以前在configurable-http-proxyjupyterhub.sqlite中遇到过同样的问题-问题是多用户脚本试图将这些文件保存在系统目录(/lib/systemd/system/jupyterhub.service/etc/systemd/system/jupyterhub.service)中。你知道吗

我在jupyter_config.py中更改这些参数:

## url for the database. e.g. `sqlite:///jupyterhub.sqlite`
c.JupyterHub.db_url = 'sqlite:////data/jupyterhub/jupyterhub.sqlite'

## DEPRECATED since version 0.8. Use ConfigurableHTTPProxy.command
#c.JupyterHub.proxy_cmd = []
c.ConfigurableHTTPProxy.command = '/data/anaconda3/envs/fraud/bin/configurable-http-proxy'

所以我对jupyterhub-proxy.pid尝试了同样的方法:

## File to write PID Useful for daemonizing JupyterHub.
c.JupyterHub.pid_file = '/data/jupyterhub/jupyterhub-proxy.pid'

但看起来JupyterHub忽略了它,仍然试图将其保存到系统目录中! 我将print添加到jupyterhub/proxy.py_write_pid_file(self)函数中:

self.log.info("Writing log: %s", self.pid_file)
self.log.info("Writing log: %s", os.path.abspath(os.curdir))

输出:

[I 2019-12-19 20:23:50.289 JupyterHub proxy:562] Writing proxy pid file: jupyterhub-proxy.pid

[I 2019-12-19 20:23:50.290 JupyterHub proxy:564] Writing log: /

我的想法-也许还有一个配置参数我需要更改,但我找不到任何相关的。你知道吗


Tags: selflogconfighttpsqlitedatapidfile