kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.72k stars 2.39k forks source link

jupyter notebook connection issues #282

Closed pwl closed 7 years ago

pwl commented 7 years ago

I configured the container with

docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -c -u udp://xxx.xxx.xxx.xxx

and I'm running it with the standard systemd command as per official guide. I'm using this setup to connect a computer at work with my laptop at home through an external VPS.

Everything is running perfectly (ssh, http, etc.) but I have some weird issues with running a jupyter notebook. It looks like I can make http requests only a few times and then I get blocked (no more replies from the computer at work for some time), whereas when I connect to the notebook directly from the computer at work through local network it all works fine. The detailed bug report can be found here: https://github.com/jupyter/notebook/issues/2583. Simply put the requests that normally look like

GET XHR http://192.168.255.10:8888/api/contents/Untitled.ipynb [HTTP/1.1 200 OK 32ms]
PUT XHR http://192.168.255.10:8888/api/contents/Untitled.ipynb [HTTP/1.1 200 OK 67ms]
POST XHR http://192.168.255.10:8888/api/contents/Untitled.ipynb/checkpoints [HTTP/1.1 201 Created 31ms]

start looking like this:

GET XHR http://192.168.255.10:8888/api/contents/Untitled.ipynb [HTTP/1.1 200 OK 33ms]
PUT XHR http://192.168.255.10:8888/api/contents/Untitled.ipynb

so no reply to PUT and POST never comes through.

I don't know if this is caused by the VPN configuration or by jupyter notebook. I've been doing some research on the latter and didn't find any remotely similar bugs. Is there a chance that this could be caused by the VPN?

Sorry if this ends up unrelated to the VPN but I'm running out of options now.

pwl commented 7 years ago

Fixed by switching to a TCP protocol according to this guide.