What is the best tool for monitoring jupyter notebooks websockets communication?

286 views
Skip to first unread message

Christian Schafmeister

unread,
Dec 18, 2017, 9:16:22 AM12/18/17
to Project Jupyter

Howdy,

We are developing a jupyter notebook kernel in Common Lisp that supports jupyter widgets.

What is the best tool for monitoring jupyter notebooks websockets communication?
We primarily develop on OS X 

We have used Firefox 56.0.2 with the "Websocket monitor" extension - but that will stop working if I upgrade to Firefox quantum.

I've installed wireshark but that doesn't seem to capture everything on the loopback interface.
I'm new to wireshark and perhaps I'm not using it correctly.
I see many more messages in "Firefox/Websocket monitor" than I see in the wireshark window with 'websocket' filter.

A particular problem that we have is that the websockets frames going from the jupyter server to the browser are "Binary format" and not "Text format".
This appears to work completely fine for jupyter notebook operation but it makes it more difficult to see the JSON messages in the messages because only OS X Safari, Firefox with the websocket monitor and wireshark with the websocket filter can be configured to present the JSON payload of a binary format frames.
I'll post another question about "binary" vs "text" format websocket frame and how to control it.

Best,

Christian Schafmeister
Professor
Chemistry Department
Temple University

Thomas Kluyver

unread,
Dec 18, 2017, 9:31:48 AM12/18/17
to Project Jupyter
I'm not sure about monitoring websockets, but the websocket messages should be directly translated from the ZMQ messages. If you run the Qt console with the debug option (jupyter qtconsole --debug --kernel mykernelname), it should show all the messages it sends and receives in the terminal where you launched it.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/cd995831-cd04-45d8-ba81-cd8ee25d9253%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sp...@draves.org

unread,
Dec 18, 2017, 11:00:00 AM12/18/17
to jup...@googlegroups.com
awesome to hear someone is working on common lisp and widgets!
we did similar work for the jvm and found chrome's network debug panel to be adequate.
it breaks the websocket traffic into frames and displays the json contents nicely, including interactive unfolding of the contents.


For more options, visit https://groups.google.com/d/optout.

Christian Schafmeister

unread,
Dec 18, 2017, 11:25:34 AM12/18/17
to Project Jupyter
Hi - thank you.  

I've got an undergraduate working on adding jupyter widgets 7.0 level support. 
I'm going to point him at this group so that he can benefit from it.

I posted another question (https://groups.google.com/forum/#!topic/jupyter/CeFeG63Ckw8) on binary vs text websocket frames and jupyter notebooks.
I tried the network debug panel of every browser I could get my hands on and found only Firefox 56.x with the 'websocket monitor' and Safari could reveal the contents of the binary websocket frames that jupyter notebooks is using when our kernel communicates through it to the browser.
If we could get the server to stop using binary frames and use text frames (like we see with the ipython kernel) I think we would be able to use more tools to monitor the communication.

I'll try the qtconsole - thank you.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/cd995831-cd04-45d8-ba81-cd8ee25d9253%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Christian Schafmeister

unread,
Dec 18, 2017, 11:28:30 AM12/18/17
to Project Jupyter
Thank you!

I'll give qtconsole a whirl.


On Monday, December 18, 2017 at 9:31:48 AM UTC-5, takowl wrote:
I'm not sure about monitoring websockets, but the websocket messages should be directly translated from the ZMQ messages. If you run the Qt console with the debug option (jupyter qtconsole --debug --kernel mykernelname), it should show all the messages it sends and receives in the terminal where you launched it.
On 18 December 2017 at 14:16, Christian Schafmeister <drschaf...@gmail.com> wrote:

Howdy,

We are developing a jupyter notebook kernel in Common Lisp that supports jupyter widgets.

What is the best tool for monitoring jupyter notebooks websockets communication?
We primarily develop on OS X 

We have used Firefox 56.0.2 with the "Websocket monitor" extension - but that will stop working if I upgrade to Firefox quantum.

I've installed wireshark but that doesn't seem to capture everything on the loopback interface.
I'm new to wireshark and perhaps I'm not using it correctly.
I see many more messages in "Firefox/Websocket monitor" than I see in the wireshark window with 'websocket' filter.

A particular problem that we have is that the websockets frames going from the jupyter server to the browser are "Binary format" and not "Text format".
This appears to work completely fine for jupyter notebook operation but it makes it more difficult to see the JSON messages in the messages because only OS X Safari, Firefox with the websocket monitor and wireshark with the websocket filter can be configured to present the JSON payload of a binary format frames.
I'll post another question about "binary" vs "text" format websocket frame and how to control it.

Best,

Christian Schafmeister
Professor
Chemistry Department
Temple University

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

Thomas Kluyver

unread,
Dec 18, 2017, 2:47:31 PM12/18/17
to Project Jupyter
Oh, I missed that it's related to widgets. Widgets won't work in the Qt console, because they need an HTML frontend. You might need to insert some debugging code.

To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages