Why I can't access remote Jupyter Notebook server?

前端 未结 15 848
清酒与你
清酒与你 2020-12-02 04:53

I have started a Jupyter Notebook server on my centos6.5 server.And jupyter is running like

[I 17:40:59.649 NotebookApp] Serving notebooks from local directo         


        
相关标签:
15条回答
  • 2020-12-02 05:06

    Anyone who is still stuck - follow the instructions on this page.

    Basically:

    1. Follow the steps as initially described by AWS.

      1. Open SSH as normal.
      2. source activate python3
      3. Jupyter Notebook
    2. Don't cut and paste anything. Instead open a new terminal window without closing the first one.

    3. In the new window enter enter the SSH command as described in the above link.

    4. Open a web browser and go to http://127.0.0.1:8157

    0 讨论(0)
  • 2020-12-02 05:08

    I'm using Anaconda3 on Windows 10. When you install it rembember to flag "add to Enviroment Variables".


    Prerequisite: A notebook configuration file

    Check to see if you have a notebook configuration file, jupyter_notebook_config.py. The default location for this file is your Jupyter folder located in your home directory:

    • Windows: C:\\Users\\USERNAME\\.jupyter\\jupyter_notebook_config.py
    • OS X: /Users/USERNAME/.jupyter/jupyter_notebook_config.py
    • Linux: /home/USERNAME/.jupyter/jupyter_notebook_config.py

    If you don't already have a Jupyter folder, or if your Jupyter folder doesn't contain a notebook configuration file, run the following command:

    $ jupyter notebook --generate-config

    This command will create the Jupyter folder if necessary, and create notebook configuration file, jupyter_notebook_config.py, in this folder.


    By default, Jupyter Notebook only accepts connections from localhost.

    Edit the jupyter_notebook_config.py file as following to accept all incoming connections:

    c.NotebookApp.allow_origin = '*' #allow all origins

    You'll also need to change the IPs that the notebook will listen on:

    c.NotebookApp.ip = '0.0.0.0' # listen on all IPs

    0 讨论(0)
  • 2020-12-02 05:11

    Have you configured the jupyter_notebook_config.py file to allow external connections?

    By default, Jupyter Notebook only accepts connections from localhost (eg, from the same computer that its running on). By modifying the NotebookApp.allow_origin option from the default ' ' to '*', you allow Jupyter to be accessed externally.

    c.NotebookApp.allow_origin = '*' #allow all origins

    You'll also need to change the IPs that the notebook will listen on:

    c.NotebookApp.ip = '0.0.0.0' # listen on all IPs


    Also see the details in a subsequent answer in this thread.

    Documentation on the Jupyter Notebook config file.

    0 讨论(0)
  • 2020-12-02 05:12

    Try doing below step:

    Following command fixes the read/write

        sudo chmod -R a+rw /home/ubuntu/certs/mycert.pem
    
    0 讨论(0)
  • 2020-12-02 05:15

    if you are using Conda environment, you should set up config file again. And file location will be something like this. I did not setup config file after I created env in Conda and that was my connection problem.

    C:\Users\syurt\AppData\Local\Continuum\anaconda3\envs\myenv\share\jupyter\jupyter_notebook_config.py
    
    0 讨论(0)
  • 2020-12-02 05:16

    If you are still having trouble and you are running something like EC2 AWS instance, it may just be a case of opening the port through the AWS console.

    see this answer

    0 讨论(0)
提交回复
热议问题