KernelRestarter: restart failed in jupyter , Kernel died

13,757

Solution 1

This article solved in my case. Jupyter-notebook reports an error KernelRestarter: restart failed or "kernel starting, please wait"

Basically, uninstall all packages listed in article and reinstall jupyter and notebook

pip uninstall -y ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils jupyter notebook tornado
pip install jupyter notebook

Solution 2

I've updated it as:

pip install --upgrade prompt-toolkit==2.0.4 (old is 1.0.15)

pip install --upgrade ipython==7.0.1 (old is 6.5.0)

pip install --upgrade jupyter-console==6.0.0 (old is 5.2.0)

However, the above problems are not solved, and the above information remains unchanged.

Share:
13,757
huye
Author by

huye

Updated on June 29, 2022

Comments

  • huye
    huye almost 2 years
    [I 10:43:53.627 NotebookApp] 启动notebooks 在本地路径: /opt/soft/recommender/jupyter
    
    [I 10:43:53.627 NotebookApp] 本程序运行在: http://10.48.204.120:8888/
    
    [I 10:43:53.627 NotebookApp] 使用control-c停止此服务器并关闭所有内核(两次跳过确认).
    
    [W 10:43:53.628 NotebookApp] 没有找到web浏览器: could not locate runnable browser.
    
    [I 10:44:11.697 NotebookApp] Kernel started: 7ea0717b-b85b-44b1-bd10-7a2079b24d94
    
    [I 10:44:11.708 NotebookApp] 302 GET /notebooks/doc/source/images/als-diagram.png (10.252.183.252) 6.63ms
    
    [I 10:44:14.691 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
    
    [I 10:44:17.719 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
    
    [I 10:44:20.746 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
    
    [I 10:44:23.774 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
    
    [W 10:44:26.800 NotebookApp] KernelRestarter: restart failed
    
    [W 10:44:26.801 NotebookApp] Kernel 7ea0717b-b85b-44b1-bd10-7a2079b24d94 died, removing from map.
    
    [W 10:45:11.836 NotebookApp] Timeout waiting for kernel_info reply from 7ea0717b-b85b-44b1-bd10-7a2079b24d94
    
    [E 10:45:11.839 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 7ea0717b-b85b-44b1-bd10-7a2079b24d94)
    
    [I 10:46:11.948 NotebookApp] Saving file at /notebooks/elasticsearch-spark-recommender.ipynb
    

    I am trying to start jupyter notebook through pyspark, using command:

    PYSPARK_DRIVER_PYTHON="jupyter" PYSPARK_DRIVER_PYTHON_OPTS="notebook"
    ../spark-2.2.0-bin-hadoop2.7/bin/pyspark --driver-memory 4g --driver-class-path /opt/soft/recommender/spark/elasticsearch-hadoop-5.3.0/dist/elasticsearch-spark-20_2.11-5.3.0.jar
    

    I can open jupyter by remote browser, but because kernel restart failed, I can't run python demo by jupyter.

    The python version is 3.5.0. Jupyter and ipykernel all up-to-date. prompt-toolkit version is 1.0.15.

    If I update prompt-toolkit version to 2.0.4, then starting pyspark will throw a lot of error messages.

    How can I fix it?

  • TryingHardToBecomeAGoodPrSlvr
    TryingHardToBecomeAGoodPrSlvr over 2 years
    God bless you bud! You made my day by providing this info.