jupyter throw错误:socket.gaierror:[Errno -2]名称或服务未知

Mic*_*man 13 python pyspark jupyter jupyter-notebook

我在AWS EMR上运行了一个pyspark集群,并将Jupyter用于pyspark驱动程序.最近,脚本失败了.Jupiter无法启动服务器.我安装conda install jupyter并开始sudo initctl start jupyter.集群运行正常.以下是服务器的配置值.

# jupyter configs
mkdir -p ~/.jupyter
touch ls ~/.jupyter/jupyter_notebook_config.py
HASHED_PASSWORD=$(python -c "from notebook.auth import passwd; 
print(passwd('$JUPYTER_PASSWORD'))")
echo "c.NotebookApp.password = u'$HASHED_PASSWORD'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.open_browser = False" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.notebook_dir = '/mnt/$BUCKET/$FOLDER'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.ContentsManager.checkpoints_kwargs = {'root_dir': '.checkpoints'}" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.port = 8080" >> ~/.jupyter/jupyter_notebook_config.py
Run Code Online (Sandbox Code Playgroud)

Mic*_*man 42

我发现更新到jupyter 5.7之后.我不得不修改配置参数.更改

echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py
Run Code Online (Sandbox Code Playgroud)

echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py
Run Code Online (Sandbox Code Playgroud)

  • 它帮了我,谢谢你这样启动我得到了同样的错误:jupyter-notebook --open_browser = False --ip =*我把它改成了这一行,一切都运行正常:jupyter-notebook --open_browser = False - IP = "0.0.0.0" (3认同)