<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
Is there a way to disable websockets in ipython notebook server so the client will fall back to something firewall friendly?<BR>
<BR>
On Fri, 2012-09-21 at 17:40 +0200, Matthias BUSSONNIER wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Le 21 sept. 2012 &#224; 17:27, Darren Govoni a &#233;crit :
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE TYPE=CITE>
        Not sure. But the calls should be rather instant. The page is only up for a few seconds, then I try to execute a cell and get the errors right away, so I don't think its timing out. <BR>
        <BR>
        There is some added security on the network I am on, but what struck me was there is still a ws:// error reference.<BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Sockjs does try to establish web socket connexion first and use fallbacks only if it fails.
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    I guess here the connexion is established, so socks assume web socket does work, but fail afterward.
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    It should be possible to ask sockjs to avoid trying web socket in your particular case.
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    see&nbsp;<A HREF="https://github.com/sockjs/sockjs-client#sockjs-client-api">https://github.com/sockjs/sockjs-client#sockjs-client-api</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    --&nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Matthias
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE TYPE=CITE>
        <BR>
        If all the calls return on the same outbound port as the notebook, I think our security will be satisfied.<BR>
        <BR>
        &lt;br&gt;&lt;br&gt;&lt;br&gt;------- Original Message -------<BR>
        On 9/21/2012 &nbsp;10:12 AM Matthias BUSSONNIER wrote:&lt;br&gt;sept. 2012 &#65533; 15:23, Darren Govoni a &#65533;crit :<BR>
        &lt;br&gt;<BR>
        &lt;br&gt;&gt; Hi again,<BR>
        &lt;br&gt;&gt; <BR>
        &lt;br&gt;&gt; &nbsp;&nbsp;&nbsp;I'm trying to test the SockJS PR code on our network (which restricts some non-origination port access). Here is the errors I get loading a notebook.<BR>
        &lt;br&gt;&gt; <BR>
        &lt;br&gt;&gt; &nbsp;<BR>
        &lt;br&gt;&gt; GET <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/...6f72-2332-4b46-801e-7b2ac3d7279c?_=1348150153522">http://ec2-23-22-85-215.compute-1.amazonaws.com/...6f72-2332-4b46-801e-7b2ac3d7279c?_=1348150153522</A><BR>
        &lt;br&gt;&gt; 200 OK<BR>
        &lt;br&gt;&gt; 875ms <BR>
        &lt;br&gt;&gt; jquery...v=ddb84 (line 4)<BR>
        &lt;br&gt;&gt; POST <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/...ls?notebook=3f516f72-2332-4b46-801e-7b2ac3d7279c">http://ec2-23-22-85-215.compute-1.amazonaws.com/...ls?notebook=3f516f72-2332-4b46-801e-7b2ac3d7279c</A><BR>
        &lt;br&gt;&gt; 200 OK<BR>
        &lt;br&gt;&gt; 156ms <BR>
        &lt;br&gt;&gt; jquery...v=ddb84 (line 4)<BR>
        &lt;br&gt;&gt; Kernel started: <BR>
        &lt;br&gt;&gt; 4fcdd448-528c-4398-9f35-66ef0c8dd845<BR>
        &lt;br&gt;&gt; kernel.js?v=8ec9a (line 72)<BR>
        &lt;br&gt;&gt; Starting SockJS:<BR>
        &lt;br&gt;&gt; <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/kernels/4fcdd448-528c-4398-9f35-66ef0c8dd845">http://ec2-23-22-85-215.compute-1.amazonaws.com/kernels/4fcdd448-528c-4398-9f35-66ef0c8dd845</A><BR>
        &lt;br&gt;&gt; kernel.js?v=8ec9a (line 128)<BR>
        &lt;br&gt;&gt; GET <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/...s/4fcdd448-528c-4398-9f35-66ef0c8dd845/sock/info">http://ec2-23-22-85-215.compute-1.amazonaws.com/...s/4fcdd448-528c-4398-9f35-66ef0c8dd845/sock/info</A><BR>
        &lt;br&gt;&gt; 200 OK<BR>
        &lt;br&gt;&gt; 31ms <BR>
        &lt;br&gt;&gt; sockjs...v=677b0 (line 27)<BR>
        &lt;br&gt;&gt; POST <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/...f35-66ef0c8dd845/sock/694/20e9o3i2/xhr_streaming">http://ec2-23-22-85-215.compute-1.amazonaws.com/...f35-66ef0c8dd845/sock/694/20e9o3i2/xhr_streaming</A><BR>
        &lt;br&gt;&gt; Aborted<BR>
        &lt;br&gt;&gt; <BR>
        &lt;br&gt;&gt; sockjs...v=677b0 (line 27)<BR>
        &lt;br&gt;&gt; POST <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/...28c-4398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr">http://ec2-23-22-85-215.compute-1.amazonaws.com/...28c-4398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr</A><BR>
        &lt;br&gt;&gt; 200 OK<BR>
        &lt;br&gt;&gt; 156ms <BR>
        &lt;br&gt;&gt; sockjs...v=677b0 (line 27)<BR>
        &lt;br&gt;&gt; POST <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/">http://ec2-23-22-85-215.compute-1.amazonaws.com/</A>.. .398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr_send<BR>
        &lt;br&gt;&gt; 500 Internal Server Error<BR>
        &lt;br&gt;&gt; 63ms <BR>
        &lt;br&gt;&gt; sockjs...v=677b0 (line 27)<BR>
        &lt;br&gt;&gt; POST <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/...28c-4398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr">http://ec2-23-22-85-215.compute-1.amazonaws.com/...28c-4398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr</A><BR>
        &lt;br&gt;&gt; 200 OK<BR>
        &lt;br&gt;&gt; 47ms <BR>
        &lt;br&gt;&gt; sockjs...v=677b0 (line 27)<BR>
        &lt;br&gt;&gt; &quot;NetworkError: 500 Internal Server Error - <A HREF="http://ec2-23-22-85-215.compute-1.amazonaws.com/kernels/4fcdd448-528c-4398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr_send">http://ec2-23-22-85-215.compute-1.amazonaws.com/kernels/4fcdd448-528c-4398-9f35-66ef0c8dd845/sock/694/9j21bbu5/xhr_send</A>&quot;<BR>
        &lt;br&gt;&gt; xhr_send<BR>
        &lt;br&gt;&gt; The connection to <A HREF="ws://ec2-23-22-85-215.compute-1.amazonaws.com/kernels/4fcdd448-528c-4398-9f35-66ef0c8dd845/sock/694/k9gnz13n/websocket">ws://ec2-23-22-85-215.compute-1.amazonaws.com/kernels/4fcdd448-528c-4398-9f35-66ef0c8dd845/sock/694/k9gnz13n/websocket</A> was interrupted while the page was loading.<BR>
        &lt;br&gt;&gt; &nbsp; <BR>
        &lt;br&gt;&gt; ...)})},y.prototype._didMessage=function(a){var b=this,c=a.slice(0,1);switch(c){cas...<BR>
        &lt;br&gt;&gt; sockjs...v=677b0 (line 27)<BR>
        &lt;br&gt;Can it be some security measure so that even with connexion=keep-alive either a proxy or the remote server close the connexion after &nbsp;a given timeout ?<BR>
        &lt;br&gt;I have not enough netcat foo to tell you how to check.<BR>
        &lt;br&gt;-- <BR>
        &lt;br&gt;Matthias <BR>
        &lt;br&gt;<BR>
        &lt;br&gt;<BR>
        &lt;br&gt;<BR>
        &lt;br&gt;&gt; &nbsp;<BR>
        &lt;br&gt;&gt; _______________________________________________<BR>
        &lt;br&gt;&gt; IPython-User mailing list<BR>
        &lt;br&gt;&gt; <A HREF="mailto:IPython-User@scipy.org">IPython-User@scipy.org</A><BR>
        &lt;br&gt;&gt; <A HREF="http://mail.scipy.org/mailman/listinfo/ipython-user">http://mail.scipy.org/mailman/listinfo/ipython-user</A><BR>
        &lt;br&gt;<BR>
        &lt;br&gt;<BR>
        &lt;br&gt;_______________________________________________<BR>
        &lt;br&gt;IPython-User mailing list<BR>
        &lt;br&gt;<A HREF="mailto:IPython-User@scipy.org">IPython-User@scipy.org</A><BR>
        &lt;br&gt;<A HREF="http://mail.scipy.org/mailman/listinfo/ipython-user">http://mail.scipy.org/mailman/listinfo/ipython-user</A><BR>
        &lt;br&gt;<BR>
        _______________________________________________<BR>
        IPython-User mailing list<BR>
        <A HREF="mailto:IPython-User@scipy.org">IPython-User@scipy.org</A><BR>
        http://mail.scipy.org/mailman/listinfo/ipython-user<BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
<PRE>
_______________________________________________
IPython-User mailing list
<A HREF="mailto:IPython-User@scipy.org">IPython-User@scipy.org</A>
<A HREF="http://mail.scipy.org/mailman/listinfo/ipython-user">http://mail.scipy.org/mailman/listinfo/ipython-user</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>