jupyterhub:常规错误消息:“您的服务器在...不运行。您想重新启动吗?”

发布于 2025-02-07 09:42:00 字数 728 浏览 1 评论 0原文

我们正在运行AWS-EC2实例上的JupyterHub服务器。

当我们连接到服务器时,我们定期(通常在少于10分钟之后)会有错误消息“您的服务器在...不运行。您想重新启动它吗?”。从笔记本电脑工作时,甚至在脚本运行时仅在终端时出现错误。

其他信息:

  • EC2-INCANCE继续工作(可以通过VNC-Remote连接访问它)。
  • 我们正在通过浏览器访问jupyterhub。该问题既出现在Ubuntu 2004的Firefox和Windows 10中的Chrome中出现
  • 安装的木星包装是:

pip freeze | grep jupyter

> jupyter-client==7.0.6
> jupyter-core==4.9.1
> jupyter-resource-usage==0.6.0
> jupyter-server==1.11.2
> jupyter-telemetry==0.1.0
> jupyterhub==1.5.0
> jupyterlab==3.2.2
> jupyterlab-pygments==0.1.2
> jupyterlab-server==2.8.2
> jupyterlab-widgets==1.0.2
> nteract-on-jupyter==2.1.3

有人知道如何解决这个问题吗?

We are running a JupyterHub server that is on an AWS-EC2 instance.

When we connect to the server we regularly (often after less then 10 minutes) have the error message "Your server at ... is not running. Would you like to restart it?". The error appears while working from a notebook or even while just being in the terminal while a script is running.

Additional information:

  • The EC2-Instance continues to work (it is possible to e.g. access it via a VNC-remote connection).
  • We are accessing JupyterHub via Browser. The problem appears both via Firefox from Ubuntu 2004 and via Chrome from Windows 10.
  • The operating system is Ubuntu 18.04.6 LTS.
  • The installed Jupiter-packages are:

.

pip freeze | grep jupyter

> jupyter-client==7.0.6
> jupyter-core==4.9.1
> jupyter-resource-usage==0.6.0
> jupyter-server==1.11.2
> jupyter-telemetry==0.1.0
> jupyterhub==1.5.0
> jupyterlab==3.2.2
> jupyterlab-pygments==0.1.2
> jupyterlab-server==2.8.2
> jupyterlab-widgets==1.0.2
> nteract-on-jupyter==2.1.3

Does anyone have an idea how to solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[浮城] 2025-02-14 09:42:00

两个解决方案:

第一个解决方案 - 快速而肮脏并成功测试:
我意识到当脚本在JupyterHub终端中运行时出现错误。如果JupiterHub专注于JupiterHub,我打开了笔记本并执行以下代码:

from time import sleep
for i in range(24*60):
    print(f'server is running {i} minutes')
    sleep(60)

似乎有一个超时只是在播放Jupyter进程,但如果脚本在终端中运行,则不会。

第二个解决方案 - 干净的方法? - 尚未测试。
我在这里找到了一个超时:
https://tljh.jupyter.org/en/latest/latest/topic/topic/ iDle-culler.html

“默认情况下,JupyterHub将每60年代使用用户笔记本服务器来检查其状态。发现的每个服务器闲置了10分钟以上,将被淘汰。”

范围:

services.cull.timeout = 600

Two solutions:

First solution - Quick and dirty and tested successfully:
I realized that the error appeared when scripts have been running in the JupyterHub terminal. If JupiterHub is Jupiter focussed I opened a notebook and executed the following code:

from time import sleep
for i in range(24*60):
    print(f'server is running {i} minutes')
    sleep(60)

It seems like there is a timeout which is just ckecking Jupyter processes but not if scripts are running in the terminal.

Second solution - the clean way to do it? - Not tested yet.
I found a timeout described here:
https://tljh.jupyter.org/en/latest/topic/idle-culler.html

"By default, JupyterHub will ping the user notebook servers every 60s to check their status. Every server found to be idle for more than 10 minutes will be culled."

Parameter:

services.cull.timeout = 600
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文