<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 1 nov. 2012 à 12:49, Darren Govoni a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      &nbsp;&nbsp; When I tried the sockjs branch, my goal was for it to address
      the issue with the main branch<br>
      opening random sockets back to the server which is not a firewall
      or WAN friendly approach.<br>
      I thought sockjs was coded to address this, but I also was not
      able to get it working and tried<br>
      the various suggestions (e.g. setting disabled protocol="ws" etc)
      but it still wouldn't work across<br>
      our network.<br>
      <br>
      I would offer again, that despite the convenience of using
      on-the-fly ports, the best and most <br>
      web-compliant approach is to tunnel all the client/server
      interactions over the same port/HTTP<br>
      that the client originated and use the "front-controller" pattern
      on the server to sort out what<br>
      goes where. This approach is proven to work and to scale. And its
      how ipcontroller sort of already<br>
      works (as a hub controller for multiple engines and manages the
      interactions of those engines).<br></div></div></blockquote><div><br></div>As MinRK said :&nbsp;</div><div><div>&gt; Also, websockets do not go over special ports, they go over the exact same port as the rest of the http[s] connection.</div><div>&gt; -MinRK</div><div><br></div><div>Everything is multiplexed on the same TCP connexion, same port as usual along with http.</div><div>Then the server does "sort out what&nbsp;goes where".</div><div><br></div><div>the only port in use between browser and server is the one that appear in this line&nbsp;</div><div>[NotebookApp] The IPython Notebook is running at: <a href="https://[all">https://[all</a> ip addresses on your system]:8888/</div><div><br></div><div>looking at js console, you can see that websoket use the same port (8888) :</div><div><span style="box-sizing: border-box; color: rgb(0, 0, 0); font-family: Menlo, monospace; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(240, 240, 240);">Starting WS: <a href="wss://localhost:8888/kernels/bb353c4f-3cbe-499a-9f1f-e8d20f2292a3">wss://localhost:8888/kernels/bb353c4f-3cbe-499a-9f1f-e8d20f2292a3</a></span><span style="color: rgb(0, 0, 0); font-family: Menlo, monospace; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(240, 240, 240); display: inline !important; float: none;"> </span></div><div><br></div><div>You can set it to 80 or 443 if you wish (--port option) but you need to be root.</div><div><br></div><div>Sock JS provide fallbacks if websocket does not go through, with long polling… etc.</div><div><br></div><div>The&nbsp;&nbsp;"on-the-fly ports&nbsp;port" are to communicate between **server** and **kernels** they have nothing to do with browser frontend&nbsp;&lt;-&gt; server communication.</div><div>If there were any issues with those random port, user would not be able to have a working qtconsole or zmq console.</div><div><br></div><div>--&nbsp;</div><div>Matthias</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><div class="moz-cite-prefix">
      <br>
      Darren<br>
      <br>
      On 10/31/2012 11:23 PM, Massimo Di Stefano wrote:<br>
    </div>
    <blockquote cite="mid:B3884752-3818-46A7-88BE-FD8BE1FF9F71@gmail.com" type="cite">
      <div>
            <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
              -webkit-line-break: after-white-space; ">
                <div style="word-wrap: break-word; -webkit-nbsp-mode:
                  space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-style: normal;
                    font-variant: normal; font-weight: normal;
                    letter-spacing: normal; orphans: 2; text-align:
                    -webkit-auto; text-indent: 0px; text-transform:
                    none; white-space: normal; widows: 2; word-spacing:
                    0px; -webkit-text-decorations-in-effect: none;
                    -webkit-text-size-adjust: auto;
                    -webkit-text-stroke-width: 0px; ">
                    <div style="word-wrap: break-word;
                      -webkit-nbsp-mode: space; -webkit-line-break:
                      after-white-space; "><span class="Apple-style-span" style="font-style:
                        normal; font-variant: normal; font-weight:
                        normal; letter-spacing: normal; orphans: 2;
                        text-align: -webkit-auto; text-indent: 0px;
                        text-transform: none; white-space: normal;
                        widows: 2; word-spacing: 0px;
                        -webkit-text-decorations-in-effect: none;
                        -webkit-text-size-adjust: auto;
                        -webkit-text-stroke-width: 0px; ">
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; ">Hi All,</span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; "><br>
                          </span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; "><br>
                          </span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; ">i've
                            exactly the same needs,&nbsp;</span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; ">the
                            network of my institute is under a VPN &amp;
                            firewall&nbsp;</span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; ">and they
                            don't allow me to run the notebook outside
                            the VPN</span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><br>
                        </div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; ">looking
                            for a solution i found the sockjs branch a
                            possible way to figure out this problem&nbsp;</span></div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><span class="Apple-style-span" style="font-style:
                            normal; font-variant: normal; font-weight:
                            normal; letter-spacing: normal; orphans: 2;
                            text-align: -webkit-auto; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            widows: 2; word-spacing: 0px;
                            -webkit-text-decorations-in-effect: none;
                            -webkit-text-size-adjust: auto;
                            -webkit-text-stroke-width: 0px; ">i
                            reinstalled ipython using the sokjs branch&nbsp;</span>..
                          but i guess i need to tune-up some settings in
                          order to have it running.</div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; ">because i have exactly
                          the same behavior of master branch.</div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><br>
                        </div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; ">please can you try to
                          guide me to learn how to use that branch ?</div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><br>
                        </div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; ">thanks.</div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><br>
                        </div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; ">Massimo.</div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; "><br>
                        </div>
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space; ">Il giorno Sep 19, 2012,
                          alle ore 9:12 AM, Darren Govoni ha scritto:</div>
                      </span></div>
                  </span></div>
              </div>
          </div>
      <div><br class="Apple-interchange-newline">
        <blockquote type="cite"><p>Hi,</p><p>&nbsp; I got the sockjs code PR from minrk git and wanted to try
            it from my Amazon instance within our network (which blocks
            non 80 outbound ports). I have configured my ipython
            notebook to run on port 80.</p><p>When I access the notebook, I get this error in FF.</p><p>--------------------------------------------------------------
          </p>
          <div class="logRow logRow-log">
            <pre class="objectBox inline objectBox-text ">Kernel started: </pre>
            <span> </span><span>5c3becbf-c91b-4bed-927d-e2c67a2f01d3</span><a moz-do-not-send="true" class="objectLink
              objectLink-sourceLink a11yFocus ">
              <div class=" ">kernel.js?v=b53bb (line 80)</div>
            </a></div>
          <div class="logRow logRow-log">
            <pre class="objectBox inline objectBox-text ">Starting WS:</pre>
            <span> </span><span><a moz-do-not-send="true" href="ws://ec2-50-17-81-219.compute-1.amazonaws.com/kernels/5c3becbf-c91b-4bed-927d-e2c67a2f01d3">ws://ec2-50-17-81-219.compute-1.amazonaws.com/kernels/5c3becbf-c91b-4bed-927d-e2c67a2f01d3</a></span><a moz-do-not-send="true" class="objectLink
              objectLink-sourceLink a11yFocus ">
              <div class=" ">kernel.js?v=b53bb (line 127)</div>
            </a></div>
          <div class="logRow logRow-errorMessage">
            <pre class="objectBox inline objectBox-errorMessage hasBreakSwitch "><div class="errorTitle focusRow subLogRow "><span class="errorMessage ">The connection to <a moz-do-not-send="true" href="ws://ec2-50-17-81-219.compute-1.amazonaws.com/kernels/5c3becbf-c91b-4bed-927d-e2c67a2f01d3/shell">ws://ec2-50-17-81-219.compute-1.amazonaws.com/kernels/5c3becbf-c91b-4bed-927d-e2c67a2f01d3/shell</a> was interrupted while the page was loading.</span></div><div class="errorSourceBox errorSource-show focusRow subLogRow "><table class=" " border="0" cellpadding="0" cellspacing="0"><tbody class=" "><tr class=" "><td class=" ">&nbsp;</td><td class=" "><a moz-do-not-send="true" class="errorSource a11yFocus "><pre class="errorSourceCode ">this.shell_channel = new this.WebSocket(ws_url + "/shell");</pre></a><a moz-do-not-send="true" class="objectLink objectLink-sourceLink a11yFocus "><div class=" ">kernel.js?v=b53bb (line 128)</div></a></td></tr></tbody></table></div></pre>
          </div>
          <pre class="objectBox inline objectBox-errorMessage hasBreakSwitch "><div class="errorTitle focusRow subLogRow "><span class="errorMessage ">The connection to <a moz-do-not-send="true" href="ws://ec2-50-17-81-219.comput">ws://ec2-50-17-81-219.comput</a>
 <a moz-do-not-send="true" href="http://e-1.amazonaws.com/kernels/5c3becbf-c91b-4bed-927d-e2c67a2f01d3/iopub">e-1.amazonaws.com/kernels/5c3becbf-c91b-4bed-927d-e2c67a2f01d3/iopub</a> was interrupted while the page was loading.</span></div><div class="errorSourceBox errorSource-show focusRow subLogRow "><table class=" " border="0" cellpadding="0" cellspacing="0"><tbody class=" "><tr class=" "><td class=" ">&nbsp;</td><td class=" "><a moz-do-not-send="true" class="errorSource a11yFocus "><pre class="errorSourceCode ">this.iopub_channel = new this.WebSocket(ws_url + "/iopub");</pre></a></td></tr></tbody></table></div></pre><p>&nbsp;-----------------------------------------------------</p><p>My goal/desire is to have all the interactions from client
            notebook to server to route over friendly HTTP (not random
            ports) from the originating server (which is the secure
            approach). Is this possible or intended? Otherwise, we won't
            be able to use this wonderful tool. Tips appreciated.</p><p>Darren </p>
          _______________________________________________<br>
          IPython-User mailing list<br>
          <a moz-do-not-send="true" href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
          <a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/ipython-user">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
IPython-User mailing list
<a class="moz-txt-link-abbreviated" href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a>
<a class="moz-txt-link-freetext" 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>