Closed alex4200 closed 5 years ago
Jupyter uses websockets to talk to the kernels. Since everything works until the websocket connection, my guess is that browsermob-proxy either doesn't support websockets or isn't configured to support them properly.
@minrk Yes you are correct. browsermob-proxy
indeed does not support websockets. But there is a workaround I described here: Essentially you have to handle all websocket request directly, and only handle the other request through websockets...
Looks like I have forgotten about this ticket. Since there is a workaround I will close this ticket..
I am creating automated tests to test notebooks in jupyterhub (with
python-selenium
andpy.test
) in a rather complex environment (I have no standalone setup to reproduce this error, but I will work on it).So far all works fine.
EXCEPT when I try to log every request and response through browsermob-proxy. This is a java server that acts as a proxy between the selenium webdriver (e.g. firefox driver) and the webpage in question (e.g. the jupyterhub server).
However, only and only when I use this proxy I get a jupyterhub error: "Connection failed"
What are the possible reasons I see that error? What condition(s) trigger this error message?
Addendum
On the server side I get some warnings in the notebooks server:
Complete working example
Having running a
browsermob-proxy
on your localhost on port 8080, the following code snippet can reproduce the problem. It also assumes that you are runningjupyter notebook
in a folder which contains a notebook namedUntitled.ipynb
. You need to change the token, though...Used packages: