<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 25 sept. 2012 à 14:23, Darren Govoni a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">


  <meta http-equiv="Content-Type" content="text/html; CHARSET=UTF-8">
  <meta name="GENERATOR" content="GtkHTML/3.28.3">

<div>
Is there a way to disable websockets in ipython notebook server so the client will fall back to something firewall friendly?</div></blockquote><div><br></div>Sockjs PR is not even merged yet.&nbsp;</div><div>Notebook configuration still have to be written.</div><div>The best chance you have would be to copy/past the file you want to modify in your .profile/..../static/js/</div><div>And add the corresponding value in the right place of socks not to try it.</div><div>--&nbsp;</div><div>Matthias</div><div><br><blockquote type="cite"><div>
<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 à 17:27, Darren Govoni a é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 � 15:23, Darren Govoni a �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; "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>"<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>
        <a href="http://mail.scipy.org/mailman/listinfo/ipython-user">http://mail.scipy.org/mailman/listinfo/ipython-user</a><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>
</div>

_______________________________________________<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></blockquote></div><br></body></html>