jupyter投掷错误:socket.gaierror:[Errno -2]名称或服务未知 [英] jupyter throwing error: socket.gaierror: [Errno -2] Name or service not known

查看:116
本文介绍了jupyter投掷错误:socket.gaierror:[Errno -2]名称或服务未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I run a pyspark cluster on AWS EMR and use Jupyter to the pyspark driver. Recently, the script failed. Jupiter fails to start a server. I install with conda install jupyter and start with sudo initctl start jupyter. The cluster runs fine. Here are the config values of the server.

# 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

推荐答案

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

I found that after the update to jupyter 5.7. I had to modify the config parameters. Change

echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py

echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py

这篇关于jupyter投掷错误:socket.gaierror:[Errno -2]名称或服务未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆