Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Jupyterhub:PermissionError:[Errno 13]权限被拒绝:';jupyterhub proxy.pid';_Python_Linux_Proxy_Sudo_Jupyterhub - Fatal编程技术网

Python Jupyterhub:PermissionError:[Errno 13]权限被拒绝:';jupyterhub proxy.pid';

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

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

但我在尝试启动多用户时出现以下错误,如下所述:

我以前在使用
可配置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_文件
参数对我有效