I set up an Ubuntu server to host a Jupyter Notebook that I can access from the web. Everything seems to work but whenever I open the notebook, the Python Kernel is stuck and it does not connect:
In the terminal, with the current configuration it does not report warnings or errors:
but I have tried many similar configurations and sometimes, when the kernel tried to connect, it was showing warnings like:
I have found various similar issues online and they usually point to either the Jupyter configuration or the Apache/nginx configuration, however I have tried many of the proposed configurations and none of them solved my problem. I cannot exclude the problem is somewhere else.
jupyter_notebook_config.py: Notice that I have commented out the references to the certificate, if I don't, then the notebook browser will give a "proxy error" and it won't load. However, the certificate is loaded in the apache configuration and seems to work fine there. Is it necessary to have it loaded here as well?
apache configuration: Commented out are some of the many lines I tried to add following suggestions from other pages. Any help will be really welcome, I have been stuck on this for one week now.
After a full day of attempts I found a solution.
In the notebook configuration I uncommented the certificate lines.
In the apache configuration I added:
SSLProxyEngine On
I have changed the reverse proxy lines using https:
ProxyPass https://localhost:5000/notebook
ProxyPassReverse https://localhost:5000/notebook
I removed the authentication lines:
AuthName "Please login"
AuthType basic
AuthBasicProvider file
AuthUserFile "/home/pomi/auth_file_name"
Require valid-user
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.