[Paraview] Visualizing a Cone with PVW - Connection can't be established

Dmitry Duplyakin duplyakin at uchicago.edu
Mon Jul 21 10:01:28 EDT 2014


Thank you very much, Sebastien!

Launcher side:
>
> "sessionURL": "ws://YOUR_HOST_NAME_TO_REPLACE(the one used to connect to apache)/proxy?sessionId=${id}",
>
> "proxy_file": "/data/proxy.txt"
>
> This is exactly what we have in our launcher:

  "sessionURL": "ws://${host}:${port}/ws",

  "host": "localhost",

  "port": 8080,

Your sessionURL looks different. Do you actually use "proxy?sessionId="
there? Ours came directly from the script you've suggested earlier:
http://www.paraview.org/gitweb?p=ParaViewSuperbuild.git;a=blob_plain;f=Scripts/pvw-setup.py;hb=HEAD


> Apache side
>
> RewriteMap  session-to-port  txt:/data/proxy.txt
>
> In Apache we have:
RewriteEngine On
RewriteMap session-to-port txt:/pv/conf/proxy.conf
RewriteCond %{QUERY_STRING}     ^sessionId=(.*)$ [NC]
RewriteRule    ^/proxy.*$  ws://${session-to-port:%1}/ws  [P]

>
> 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
>

Verified that those entires are added to the file and have the right
format.


> On the other hand you forgot that line in the config of your cone app:
> "ready_line" : "Starting factory"
>
> Thanks! Added it and now the app looks like this:

"cone": {"cmd": ["${python_exec}",
"/pv/src/VTK/Web/Applications/Cone/server/vtk_web_cone.py", "--port",
"${port}"], "ready_line" : "Starting factory"}},


> 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.
>
> 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.
>

Verified that launcher can write it and that entries are added.

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):

- can we specifically log and debug Rewrite rule actions?
- do we actually need ProxyPassReverse in Apache?
- 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.
- in launch.json there are two particular lines:
"host": "localhost",
"resources": [{"port_range": [9901, 9999], "host": "localhost"}],
where we have some confusion about using "localhost" vs. "0.0.0.0". What
exactly should we use in either case?

Appreciate your help!


> Good luck,
>
> Seb
>
>
> On Sun, Jul 20, 2014 at 10:12 AM, Dmitry Duplyakin <duplyakin at uchicago.edu
> > wrote:
>
>> Hi all,
>>
>> My name is Dmitry Duplyakin. I am a PhD student helping to build a
>> ParaViewWeb system at University of Chicago.
>>
>> We are building ParaView 4.1.0 (with OSMesa) on Amazon EC2 Ubuntu 12.04
>> instances.
>>
>> 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.)
>>
>> We are trying to visualize a simple cone:
>> (added app in launch.json)
>> "cone": {"cmd": ["${python_exec}",
>> "/pv/src/VTK/Web/Applications/Cone/server/vtk_web_cone.py", "--port",
>> "${port}"]}},
>>
>> 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:
>> ...
>>   var config = {
>>     sessionManagerURL: vtkWeb.properties.sessionManagerURL,
>>     application: "cone"
>>   };
>> ...
>>
>> 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.
>>
>> In the apache error log we see:
>> [Sun Jul 20 16:04:15 2014] [error] [client 128.135.188.231] proxy: Error
>> reading from remote server returned by /paraview/, referer:
>> http://54.211.22.94/apps/Cone/
>> [Sun Jul 20 16:04:15 2014] [error] [client 128.135.188.231] File does not
>> exist: /pv/www/ws
>>
>> It appears that it has do to with Apache configuration, where we have:
>> ProxyPass        /paraview http://localhost:8080/paraview
>> ProxyPassReverse /paraview http://localhost:8080/paraview
>> RewriteEngine On
>> RewriteMap session-to-port txt:/pv/conf/proxy.conf
>> RewriteCond %{QUERY_STRING}     ^sessionId=(.*)$ [NC]
>> RewriteRule    ^/proxy.*$  ws://${session-to-port:%1}/ws  [P]
>>
>> Do these Rewrite commands look right? How can their actions be logged and
>> verified?
>>
>> Do we actually need ProxyPassReverse here?
>>
>> Is it possible that we are missing a module or some additional
>> configuration in Apache?
>> # apachectl -t -D DUMP_MODULES
>> ...
>>  proxy_module (shared)
>>  proxy_http_module (shared)
>>  proxy_wstunnel_module (shared)
>>  rewrite_module (shared)
>> ...
>> Syntax OK
>>
>> Any debugging advice?
>>
>> Your help will be much appreciated and will allow to move forward with
>> our isntallation.
>>
>>
>> -------------------------------------------------------------------------------
>>
>> Dmitry Duplyakin
>> PhD student, CS at University of Colorado - Boulder
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140721/e05d140b/attachment.html>


More information about the ParaView mailing list