Python Jupyterhub:PermissionError:[Errno 13]权限被拒绝:';jupyterhub proxy.pid';
我正在尝试在Linux服务器上安装Jupyterhub。 所以我有sudo的权利,但我不是根。 我已经配置了JupyterHub及其配置,所以我可以在单用户模式下运行它(也可以从不同的文件夹) 但我在尝试启动多用户时出现以下错误,如下所述: 我以前在使用Python Jupyterhub:PermissionError:[Errno 13]权限被拒绝:';jupyterhub proxy.pid';,python,linux,proxy,sudo,jupyterhub,Python,Linux,Proxy,Sudo,Jupyterhub,我正在尝试在Linux服务器上安装Jupyterhub。 所以我有sudo的权利,但我不是根。 我已经配置了JupyterHub及其配置,所以我可以在单用户模式下运行它(也可以从不同的文件夹) 但我在尝试启动多用户时出现以下错误,如下所述: 我以前在使用可配置http代理和jupyterhub.sqlite时遇到过同样的问题-问题是多用户脚本试图将此文件保存在系统目录中(/lib/systemd/system/jupyterhub.service或/etc/systemd/system/jup
可配置http代理
和jupyterhub.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
的\u write\u pid\u 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]正在写入代理pid文件:JupyterHub-proxy.pid
[I 2019-12-19 20:23:50.290 JupyterHub代理:564]写入日志:/
我的想法-也许我需要更改另一个配置参数,但是我找不到任何相关的东西。在jupyterhub配置文件中设置
c.ConfigurableHTTPProxy.pid_文件
参数对我有效。在jupyterhub配置文件中设置c.ConfigurableHTTPProxy.pid_文件
参数对我有效