[Paraview] Fwd: Help with web proxy

Scott Wittenburg scott.wittenburg at kitware.com
Wed Jun 18 16:04:27 EDT 2014


Let's keep this conversation on the list, so others can benefit or correct
as applicable :-)

---------- Forwarded message ----------
From: Scott Wittenburg <scott.wittenburg at kitware.com>
Date: Wed, Jun 18, 2014 at 2:02 PM
Subject: Re: [Paraview] Help with web proxy
To: CLSA Mcmaster <clsamcmaster at gmail.com>


One thing I notice is that your virtual host specifies your public hostname
as "paraview.domain.ca", while the session url, which Apache should handle
and do re-writing on is given with a hostname "paraview.mcmaster.ca".  Do
these names really resolve to the same host?

Also, you refer to the host where the launcher and the visualization
processes should run as "192.168.1.110".  Is this, in turn, also the same
machine?

Scott



On Wed, Jun 18, 2014 at 10:54 AM, CLSA Mcmaster <clsamcmaster at gmail.com>
wrote:

> Hi Scott
>
> Thank you for your reply.
>
> That port is set in the launcher config file:
>
>  "resources" : [ { "host" : "192.168.1.110", "port_range" : [9001, 9003] }
> ],
>
> That is directly from the example, here:
> http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/#!/guide/ubuntu_14_04
>
> The entire file as edited recently:
>
> {
>     "resources": [ {"port_range": [9001, 9103], "host": "192.168.1.110"} ],
>     "sessionData": {
>       "updir": "/Home"
>     },
>     "configuration": {
>       "log_dir": "/data/pvw/logs",
>       "host": "192.168.1.110",
>       "endpoint": "paraview",
>       "sessionURL": "ws://paraview.mcmaster.ca/proxy?sessionId=${id}
> <http://paraview.mcmaster.ca/proxy?sessionId=$%7Bid%7D>",
>       "timeout": 25,
>       "upload_dir": "/data/pvw/upload",
>       "fields": ["file", "host", "port", "updir"],
>       "port": 8080,
>       "proxy_file": "/data/proxy.txt"
>     },
>     "properties": {
>       "python_path": "/data/pvw/iparaview/lib/paraview-4.1/site-packages",
>       "dataDir": "/data/pvw/data",
>       "python_exec": "/data/pvw/paraview/bin/pvpython"
>     },
>     "apps": {
>       "data_prober": {
>         "cmd": [
>           "${python_exec}",
> "${python_path}/paraview/web/pv_web_data_prober.py",
>           "--port", "${port}", "--data-dir", "${dataDir}"
>         ],
>         "ready_line" : "Starting factory"
>       },
>       "pipeline": {
>         "cmd": [
>           "${python_exec}",
> "${python_path}/paraview/web/pv_web_visualizer.py",
>           "--port", "${port}", "--data-dir", "${dataDir}"
>         ],
>         "ready_line" : "Starting factory"
>       },
>       "loader": {
>         "cmd": [
>           "${python_exec}",
> "${python_path}/paraview/web/pv_web_file_loader.py",
>           "--port", "${port}", "--data-dir", "${dataDir}"
>         ],
>         "ready_line" : "Starting factory"
>       }
>     }
>   }
>
>
> I did find an error in my vhost conf file so it now appears as follow:
>
> <VirtualHost *:80>
>       ServerAlias   paraview.domain.ca
>       ServerAdmin  webmaster at domain.ca
>       DocumentRoot /data/pvw/www
>
>       ErrorLog /data/logs/error.log
>       CustomLog /data/logs/access.log combined
>
>       # Handle launcher forwarding
>       ProxyPass /paraview http://paraview.domain.ca:8080/paraview
>
>       # Handle WebSocket forwarding
>       RewriteEngine On
>       RewriteMap  session-to-port  txt:/data/proxy.txt
>       RewriteCond %{QUERY_STRING}  ^sessionId=(.*)$               [NC]
>       RewriteRule ^/proxy.*$  ws://${session-to-port:%1}/ws  [P]
>
>         <Directory "/data/pvw/www">
>         Options Indexes FollowSymLinks
>         Order allow,deny
>         Allow from all
>         AllowOverride all
>         Require all granted
>         </Directory>
> </VirtualHost>
>
> I  am getting closer. I think. Now when I load the page I am seeing a
> popup error: "Session did not properly started"
>
> Thank you for giving this your attention.
>
>
> On Wed, Jun 18, 2014 at 12:01 PM, Scott Wittenburg <
> scott.wittenburg at kitware.com> wrote:
>
>> At first glance, this doesn't seem right:
>>
>> ws://192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2
>>
>> This makes it look as if you're expecting to have the websocket proxying
>> done at the port where a pvpython server is listening, when really Apache
>> should be doing the ws proxy.  I don't know how you set up your apache
>> rewrite rules, but I would have expected the host here to be the one that
>> Apache would handle, then Apache would rewrite the url so that your client
>> would be connected to the websocket server listening on the right port.
>>
>> But it will help to see your configurations.
>>
>> Cheers,
>> Scott
>>
>>
>>
>> On Wed, Jun 18, 2014 at 9:43 AM, Scott Wittenburg <
>> scott.wittenburg at kitware.com> wrote:
>>
>>> Could you reply with your launcher configuration file as well as the
>>> relevant virtual hosts file?  That information could help isolate what's
>>> going on.
>>>
>>> Thanks,
>>> Scott
>>>
>>>
>>> On Tue, Jun 17, 2014 at 12:21 PM, CLSA Mcmaster <clsamcmaster at gmail.com>
>>> wrote:
>>>
>>>> Hello
>>>>
>>>> I feel I am very close to getting this but I need some help.
>>>>
>>>> I am using Paraview with Python and an Apache front end with proxying.
>>>> My logs show as follows:
>>>>
>>>> [Tue Jun 17 14:18:34.353847 2014] [proxy:debug] [pid 5840]
>>>> proxy_util.c(2035): AH00943: http: has released connection for (
>>>> dragonfly.domain.ca)
>>>> [Tue Jun 17 14:18:34.353905 2014] [deflate:debug] [pid 5840]
>>>> mod_deflate.c(764): [client 192.168.1.9:45352] AH01384: Zlib:
>>>> Compressed 246 to 151 : URL /paraview/, referer:
>>>> http://paraview.domain.ca/apps/FileViewer/
>>>> [Tue Jun 17 14:18:34.366482 2014] [authz_core:debug] [pid 5843]
>>>> mod_authz_core.c(828): [client 192.168.1.9:45354] AH01628:
>>>> authorization result: granted (no directives)
>>>> [Tue Jun 17 14:18:34.366557 2014] [proxy:debug] [pid 5843]
>>>> mod_proxy.c(1104): [client 192.168.1.9:45354] AH01143: Running scheme
>>>> ws handler (attempt 0)
>>>> [Tue Jun 17 14:18:34.366566 2014] [proxy_ajp:debug] [pid 5843]
>>>> mod_proxy_ajp.c(708): [client 192.168.1.9:45354] AH00894: declining
>>>> URL ws://
>>>> 192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2
>>>> [Tue Jun 17 14:18:34.366577 2014] [proxy_http:debug] [pid 5843]
>>>> mod_proxy_http.c(1892): [client 192.168.1.9:45354] AH01113: HTTP:
>>>> declining URL ws://
>>>> 192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2
>>>> [Tue Jun 17 14:18:34.366583 2014] [proxy_wstunnel:debug] [pid 5843]
>>>> mod_proxy_wstunnel.c(331): [client 192.168.1.9:45354] AH02451: serving
>>>> URL ws://
>>>> 192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2
>>>> [Tue Jun 17 14:18:34.366590 2014] [proxy:debug] [pid 5843]
>>>> proxy_util.c(2020): AH00942: WS: has acquired connection for (*)
>>>> [Tue Jun 17 14:18:34.366596 2014] [proxy:debug] [pid 5843]
>>>> proxy_util.c(2072): [client 192.168.1.9:45354] AH00944: connecting
>>>> ws://
>>>> 192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2
>>>> to 192.168.1.110:9103
>>>> [Tue Jun 17 14:18:34.366665 2014] [proxy:debug] [pid 5843]
>>>> proxy_util.c(2206): [client 192.168.1.9:45354] AH00947: connected
>>>> /ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2 to
>>>> 192.168.1.110:9103
>>>> [Tue Jun 17 14:18:34.366800 2014] [proxy:debug] [pid 5843]
>>>> proxy_util.c(2610): AH00962: WS: connection complete to
>>>> 192.168.1.110:9103 (192.168.1.110)
>>>> [Tue Jun 17 14:18:34.574643 2014] [proxy_wstunnel:debug] [pid 5843]
>>>> mod_proxy_wstunnel.c(253): [client 192.168.1.9:45354] AH02445: woke
>>>> from poll(), i=1
>>>> [Tue Jun 17 14:18:34.574681 2014] [proxy_wstunnel:debug] [pid 5843]
>>>> mod_proxy_wstunnel.c(262): [client 192.168.1.9:45354] AH02446: sock
>>>> was readable
>>>> [Tue Jun 17 14:18:34.574725 2014] [proxy_wstunnel:debug] [pid 5843]
>>>> mod_proxy_wstunnel.c(129): (104)Connection reset by peer: [client
>>>> 192.168.1.9:45354] AH02442: error on sock - ap_get_brigade
>>>> [Tue Jun 17 14:18:34.574751 2014] [proxy:debug] [pid 5843]
>>>> proxy_util.c(2035): AH00943: WS: has released connection for (*)
>>>>
>>>> As you can see, I am getting a reset by peer but I'm not sure of the
>>>> cause. Any help or clues would be greatly appreciated.
>>>>
>>>>
>>>> _______________________________________________
>>>> 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/20140618/0ac068e5/attachment.html>


More information about the ParaView mailing list