Jupyter on EC2: SSL Error

前端 未结 5 1428
无人共我
无人共我 2021-01-03 06:45

I\'m trying to serve a Jupyter notebook from EC2 but I\'m getting an SSL error. I\'m using this AMI: TensorFlow GPU - @nottombrown (ami-8ed4d0e4). I used a self

5条回答
  •  臣服心动
    2021-01-03 07:11

    This error means that the SSL certificate can't be found.

    If you haven't yet created an SSL certificate:

    Create one by typing the following into the command line (starting at your home directory):

    $ mkdir certs
    $ cd certs
    $ sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
    

    (from these instructions)

    Now that you have an SSL certificate:

    You need to tell Jupyter where to find it.

    Take a look at jupyter_notebook_config.py if you have one (or generate one using jupyter notebook --generate-config).

    Make sure that you have the following line:

    c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem' #location of your certificate file

    (see the Jupyter Notebook docs)

    and make sure that your self-signed SSL certificate is actually at that location. A common mistake is to mix up certs with .certs for example. A mistake like this will result in Jupyter not being able to find your SSL certificate and that'll result in the error that you're getting.

提交回复
热议问题