-
Notifications
You must be signed in to change notification settings - Fork 48
Browser loses websocket connection, can't reconnect in streaming-meetup demo #156
Comments
Tried again and hit it again. Here's the combined log up to the approximate point of failure. https://gist.github.com/parente/02b2fe67897a4dacedd1 The Spark logging is noisy, but searching through, I don't see any message from the dashboard server that things have gone awry. |
So even crazier, I left it running after the websocket failure. After 200 or so console log errors about the websocket failure (see above), it reconnected and has been running ever since without a problem (30+ minutes!) |
Testing using |
I seem to have hit this probably again this AM, but this time on the
This looks like proxy upstream timeout. |
Back looking at this today and reproduced it pretty quickly. This time the websocket from browser to dashboard server dropped after 2 pushes from the backend on the meetup demo, jupyter-js-services started trying to reconnect, succeeded after 12 tries, worked for a while longer, then died again later and retried endlessly. I'm using the docker-compose setup from https://gist.github.com/527cea0481afe9fabbcd. Last time, I was using a docker-machine virtualbox instance. This time I'm using the new docker beta on OSX Hyve. So it doesn't seem to be anything at the docker / VM networking level. Will try enabling debug logging in the dashboard server to see if anything jumps out. No errors appear in the dashboard server or kernel gateway logs at the default log level. |
Caught it with logging enabled: Things are working fine to start. The last successful WS message the dashboard server logs is
The next two messages from the dashboard server, which have no timestamps unfortunately, appear to come soon after:
The kernel gateway logs no error and its SparkContext continues streaming merrily. A few moments later (which could be milliseconds or 4 seconds later, hard to tell because of the lack of timestamp on the
These could be interpreted in one of two ways, depending on how the various callbacks are ordering the log messages:
Thereafter, the dashboard server enters its normal shutdown flow:
Given that these messages say the WS client disconnected, I suspect that the two Epilogue: Before I could kill the server, the jupyter-js-services code starts its reconnect logic. At the very end of the log, there is a new WS upgrade request: It is immediately followed by a bunch more messages about insufficient data for frame, server socket close, and client sockets being removed. This appears to be the pattern that repeats over and over as the browser tries to reestablish a connection with the node server, succeeds momentarily, then immediately fails and tries again. |
One thing interesting here is that the very first message logged by the dashboard server in the comment above has the prefix:
and comes from the |
Caught it again, and this time, I only got:
Without the And a little bit later on retry:
Yea. Framing. |
I deployed streaming-meetup demo from https://github.com/jupyter-incubator/dashboards/blob/master/etc/notebooks/stream_demo/meetup-streaming.ipynb to the dashboard server as a bundle. Good news: it started off working just fine (sans a little styling nit on the paper card for some reason):
Bad news: after a few seconds, it stopped working. Checking the console I saw an endless cadence of:
I left the page and noticed that the kernel did indeed get cleaned up after our idle timeout. But when I come back to the dashboard page anew, the same error appears endlessly no matter how many times I refresh. It's like the Websocket part of the dashboard server just disappeared.
I checked the dashboard server logs, no errors that I can see. Also no problems loading the HTTP resources on refresh. Just the websocket proxy that has gone kaput.
The text was updated successfully, but these errors were encountered: