hi,
i have set up a jupyter notebook server (set up on Raspberry Pi 3) which seems to be working fine for various clients (ie firefox with local Mac, firefox with iPhone outside home network etc).
the problem arises when i try to connect from workplace. i can log in without problems (server machine has no SSL cert yet) but when i open a ipynb file to work on i cannot connect to kernel:
a "connecting to kernel" orange box on top right appears and after a while also a message: "A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration."
this is happening with firefox/IE.
any help on how i can solve the problem server-side? or what should i ask for to my IT department?
if it helps here are some more details on server set up:
server is a raspbian stretch machine with jupyter notebook installed. port 18888 on localhost where jupyter notebook is executed.
'mywebsite.com' points to a nameserver in order to reach IP address.
while this is jupyter_notebook_config.py:
c.NotebookApp.base_url = '/'
c.NotebookApp.ip = '*'
c.NotebookApp.port = 18888
c.NotebookApp.notebook_dir = '/path/to/notebook_directory'
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'sha1:xxxx....'
any help is appreciated
thanks
here is the log of firefox:
Session: kernel_created (d76ff9f4-5d9e-4897-8f89-45c74d2bceba) main.min.js:37945:13
Starting WebSockets: ws://mywebsite.com:18888/api/kernels/2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552 main.min.js:37101:9
Firefox can鈥檛 establish a connection to the server at ws://mywebsite.com:18888/api/kernels/2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552/channels?session_id=ca72532194d6444081b66b35e9e520dd main.min.js:37103:18
Kernel: kernel_disconnected (2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552) main.min.js:36745:13
WebSocket connection failed: ws://mywebsite.com:18888/api/kernels/2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552 true main.min.js:37186:13
Connection lost, reconnecting in 1 seconds. main.min.js:37204:13
Kernel: kernel_reconnecting (2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552) main.min.js:36745:13
Starting WebSockets: ws://mywebsite.com:18888/api/kernels/2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552 main.min.js:37101:9
Firefox can鈥檛 establish a connection to the server at ws://mywebsite.com:18888/api/kernels/2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552/channels?session_id=ca72532194d6444081b66b35e9e520dd main.min.js:37103:18
Kernel: kernel_disconnected (2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552) main.min.js:36745:13
WebSocket connection failed: ws://mywebsite.com:18888/api/kernels/2a2ea4a9-31f4-4e49-9c9b-ecf14f99a552 true main.min.js:37186:13
Connection lost, reconnecting in 2 seconds. main.min.js:37204:13main.min.js:36745:13
Hello, +1 experiencing this issue in the same manner.
The user is reporting : "A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration." as error in the guy as well
I solved the same problem on Raspberry Pi 4 as follows:
jupyter --version
sudo pip3 install --upgrade {every package listed by the last command including ipython}
It seems that the upgrading of ipython is critical for resolving the problem. One indication was that the program "mu" was not working after "pip3 install --upgrade jupyter".
Yes! Finally, thank you this solved my problem!
quantummeimei's solution worked for me as well. Thanks!
Most helpful comment
I solved the same problem on Raspberry Pi 4 as follows:
jupyter --version
sudo pip3 install --upgrade {every package listed by the last command including ipython}
It seems that the upgrading of ipython is critical for resolving the problem. One indication was that the program "mu" was not working after "pip3 install --upgrade jupyter".