<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px"><div>Thank you very much, Sebastien!</div><div><br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>Launcher side:</div><div><span style="font-family:Menlo,'Courier New',Courier,monospace;font-size:13px;line-height:13px;white-space:pre-wrap;color:rgb(102,102,0);background-color:rgb(247,247,247)"><pre style="margin-top:10px;margin-bottom:14px;padding:10px 12px;font-family:Menlo,'Courier New',Courier,monospace;line-height:1.3em;border:1px solid rgb(232,232,232);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;color:rgb(49,78,100);max-width:900px">
<code style="margin:0px;padding:0px;font-style:inherit;font-family:Menlo,'Courier New',Courier,monospace;line-height:13px"><span style="color:rgb(0,136,0)"><span>"sessionURL"</span><span style="color:rgb(102,102,0)">:</span><span style="color:rgb(0,0,0)"> </span><span>"ws://YOUR_HOST_NAME_TO_REPLACE(the one used to connect to apache)/proxy?sessionId=${id}",</span></span></code></pre>
<pre style="margin-top:10px;margin-bottom:14px;padding:10px 12px;font-family:Menlo,'Courier New',Courier,monospace;line-height:1.3em;border:1px solid rgb(232,232,232);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;color:rgb(49,78,100);max-width:900px">
<span style="font-style:inherit;line-height:13px;color:rgb(0,136,0)">"proxy_file"</span><span style="font-style:inherit;line-height:13px;color:rgb(102,102,0)">:</span><span style="font-style:inherit;line-height:13px;color:rgb(0,0,0)"> </span><span style="font-style:inherit;line-height:13px;color:rgb(0,136,0)">"/data/proxy.txt"</span></pre>
</span></div></div></blockquote><div>This is exactly what we have in our launcher:</div><div>
<p><span> </span>"sessionURL"<span>: </span>"ws://${host}:${port}/ws"<span>,</span></p><p><span>
</span></p><p><span> </span>"host"<span>: </span>"localhost"<span>,</span></p><p><span>
</span></p><p> <span>"port"</span>: 8080,</p><p>Your sessionURL looks different. Do you actually use "<span style="color:rgb(0,136,0);font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px">proxy?sessionId=</span>" there? Ours came directly from the script you've suggested earlier: <a href="http://www.paraview.org/gitweb?p=ParaViewSuperbuild.git;a=blob_plain;f=Scripts/pvw-setup.py;hb=HEAD" target="_blank">http://www.paraview.org/gitweb?p=ParaViewSuperbuild.git;a=blob_plain;f=Scripts/pvw-setup.py;hb=HEAD</a> </p>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Apache side</div><div><pre style="margin-top:10px;margin-bottom:14px;padding:10px 12px;font-family:Menlo,'Courier New',Courier,monospace;line-height:1.3em;border:1px solid rgb(232,232,232);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;color:rgb(49,78,100);max-width:900px;font-size:13px;background-color:rgb(247,247,247)">
<code style="margin:0px;padding:0px;font-style:inherit;font-family:Menlo,'Courier New',Courier,monospace;line-height:13px"><span style="color:rgb(102,0,102)">RewriteMap</span><span style="color:rgb(0,0,0)"> session</span><span style="color:rgb(102,102,0)">-</span><span style="color:rgb(0,0,0)">to</span><span style="color:rgb(102,102,0)">-</span><span style="color:rgb(0,0,0)">port txt</span><span style="color:rgb(102,102,0)">:</span><span style="color:rgb(0,136,0)">/data/</span><span style="color:rgb(0,0,0)">proxy</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">txt</span></code></pre>
</div><div></div></div></blockquote><div class="gmail_quote">In Apache we have:</div>RewriteEngine On<br>RewriteMap session-to-port txt:/pv/conf/proxy.conf<br>RewriteCond %{QUERY_STRING} ^sessionId=(.*)$ [NC]<br>RewriteRule ^/proxy.*$ ws://${session-to-port:%1}/ws [P]<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Then when a session start you can check the content of that /data/proxy.txt and that should one line by running session with {sessionId} localhost:yyyyy</div>
</div></blockquote><div><br></div><div>Verified that those entires are added to the file and have the right format. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>On the other hand you forgot that line in the config of your cone app: <span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(0,136,0);background-color:rgb(247,247,247)">"ready_line"</span><span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(0,0,0);background-color:rgb(247,247,247)"> </span><span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(102,102,0);background-color:rgb(247,247,247)">:</span><span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(0,0,0);background-color:rgb(247,247,247)"> </span><span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(0,136,0);background-color:rgb(247,247,247)">"Starting factory"</span></div>
<div><span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(0,136,0);background-color:rgb(247,247,247)"><br></span></div></div></blockquote><div>
Thanks! Added it and now the app looks like this:</div><div><br></div><div>"cone"<span>: </span><span>{</span>"cmd"<span>: </span><span>[</span>"${python_exec}"<span>, </span>"/pv/src/VTK/Web/Applications/Cone/server/vtk_web_cone.py"<span>, </span>"--port"<span>, </span>"${port}"<span>]</span><span>, </span>"ready_line"<span> : </span>"Starting factory"<span>}}</span><span>,</span></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:Menlo,'Courier New',Courier,monospace;font-style:inherit;line-height:13px;font-size:13px;color:rgb(0,136,0);background-color:rgb(247,247,247)"></span></div>
<div>You can check is any pvpython process is running, on which port, see if that match in the proxy file (/data/proxy.txt) and also looking at the log directory with the output of the pvpython process.</div>
<div><br></div><div>A common error could also be that the apache does not have the right to read the /data/proxy.txt file or that the launcher is not able to write it.</div></div></blockquote><div> </div><div>Verified that launcher can write it and that entries are added.</div>
<div> </div><div><div style="font-size:13px;font-family:arial,sans-serif"><div>These are the rest of our questions (we need to sort these out because they have caused some confusion and we want to clear things up and do not come back to these issues anymore):</div>
<div><br></div><div>- can we specifically log and debug Rewrite rule actions?</div><div>- do we actually need ProxyPassReverse in Apache?</div>
- what particular modules in Apache are required? So far we have: proxy_module, proxy_http_module, and rewrite_module. We are unsure whether we need proxy_wstunnel_module or not.<br>- in launch.json there are two particular lines:<br>
"host": "localhost",<br>"resources": [{"port_range": [9901, 9999], "host": "localhost"}],<br>where we have some confusion about using "localhost" vs. "0.0.0.0". What exactly should we use in either case?</div>
</div><div><br></div><div>Appreciate your help!</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>Good luck,</div>
<div><br></div>
<div>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 20, 2014 at 10:12 AM, Dmitry Duplyakin <span dir="ltr"><<a href="mailto:duplyakin@uchicago.edu" target="_blank">duplyakin@uchicago.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>My name is Dmitry Duplyakin. I am a PhD student helping to build a ParaViewWeb system at University of Chicago.</div>
<div><br></div><div><div>We are building ParaView 4.1.0 (with OSMesa) on Amazon EC2 Ubuntu 12.04 instances.</div>
<div><br></div></div><div>We have verified that PV builds without errors and that PVW launcher is functioning (new entries are added to the proxy file, vis sessions are created and are listening to ports in the specified range, etc.)</div>
<div><br></div><div>We are trying to visualize a simple cone: </div><div>(added app in launch.json)</div><div>"cone"<span>: </span><span>{</span>"cmd"<span>: </span><span>[</span>"${python_exec}"<span>, </span>"/pv/src/VTK/Web/Applications/Cone/server/vtk_web_cone.py"<span>, </span>"--port"<span>, </span>"${port}"<span>]}}</span><span>,</span></div>
<div><br></div><div>We have verified that vtk_web_cone.py actually gets called. In order to test it, we used /pv/www/apps/TestApp/index.html as a template and created /pv/www/apps/Cone/index.html where we have:</div><div>
...<br> var config = {<br> sessionManagerURL: vtkWeb.properties.sessionManagerURL,<br> application: "cone"<br> };</div><div>...</div><div><br></div><div>Now when we access this app via a browser at: http://<hostname>/apps/Cone/ we either get a timeout or "connection can't be established" message.<br>
</div><div><br></div><div>In the apache error log we see: </div><div><div>[Sun Jul 20 16:04:15 2014] [error] [client 128.135.188.231] proxy: Error reading from remote server returned by /paraview/, referer: <a href="http://54.211.22.94/apps/Cone/" target="_blank">http://54.211.22.94/apps/Cone/</a></div>
<div>[Sun Jul 20 16:04:15 2014] [error] [client 128.135.188.231] File does not exist: /pv/www/ws</div></div>
<div><br></div><div>It appears that it has do to with Apache configuration, where we have:</div><div><div>ProxyPass /paraview <a href="http://localhost:8080/paraview" target="_blank">http://localhost:8080/paraview</a></div>
<div>ProxyPassReverse /paraview <a href="http://localhost:8080/paraview" target="_blank">http://localhost:8080/paraview</a></div>
<div>RewriteEngine On</div><div>RewriteMap session-to-port txt:/pv/conf/proxy.conf</div>RewriteCond %{QUERY_STRING} ^sessionId=(.*)$ [NC]<br>RewriteRule ^/proxy.*$ ws://${session-to-port:%1}/ws [P]<br><br>Do these Rewrite commands look right? How can their actions be logged and verified?</div>
<div><br></div><div>Do we actually need ProxyPassReverse here?<br></div><div><br></div><div>Is it possible that we are missing a module or some additional configuration in Apache?</div><div><div># apachectl -t -D DUMP_MODULES</div>
<div>...</div><div> proxy_module (shared)</div><div> proxy_http_module (shared)</div><div> proxy_wstunnel_module (shared)</div><div> rewrite_module (shared)</div><div>...</div><div>Syntax OK</div></div><div><br></div><div>
Any debugging advice?</div><div><br></div><div>Your help will be much appreciated and will allow to move forward with our isntallation.</div><div><br></div><div>-------------------------------------------------------------------------------<div dir="ltr">
<div><br></div><div>Dmitry Duplyakin </div><div>PhD student, CS at University of Colorado - Boulder</div></div></div><div> </div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div>