<div dir="ltr">Let's keep this conversation on the list, so others can benefit or correct as applicable :-)<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Scott Wittenburg</b> <span dir="ltr"><<a href="mailto:scott.wittenburg@kitware.com">scott.wittenburg@kitware.com</a>></span><br>
Date: Wed, Jun 18, 2014 at 2:02 PM<br>Subject: Re: [Paraview] Help with web proxy<br>To: CLSA Mcmaster <<a href="mailto:clsamcmaster@gmail.com">clsamcmaster@gmail.com</a>><br><br><br><div dir="ltr">One thing I notice is that your virtual host specifies your public hostname as "<a href="http://paraview.domain.ca" target="_blank">paraview.domain.ca</a>", while the session url, which Apache should handle and do re-writing on is given with a hostname "<a href="http://paraview.mcmaster.ca" target="_blank">paraview.mcmaster.ca</a>". Do these names really resolve to the same host?<div>
<br></div><div>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? </div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Scott</div><div><br>
</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 10:54 AM, CLSA Mcmaster <span dir="ltr"><<a href="mailto:clsamcmaster@gmail.com" target="_blank">clsamcmaster@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi Scott<br><br></div><div>Thank you for your reply.<br></div><div><br></div>That port is set in the launcher config file:<br>
<br> "resources" : [ { "host" : "192.168.1.110", "port_range" : [9001, 9003] } ],<br>
<br></div>That is directly from the example, here: <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/#!/guide/ubuntu_14_04" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/#!/guide/ubuntu_14_04</a><br>
<br></div><div>The entire file as edited recently:<br><br>{<br> "resources": [ {"port_range": [9001, 9103], "host": "192.168.1.110"} ],<br> "sessionData": {<br> "updir": "/Home"<br>
},<br> "configuration": {<br> "log_dir": "/data/pvw/logs",<br> "host": "192.168.1.110",<br> "endpoint": "paraview",<br> "sessionURL": "ws://<a href="http://paraview.mcmaster.ca/proxy?sessionId=$%7Bid%7D" target="_blank">paraview.mcmaster.ca/proxy?sessionId=${id}</a>",<br>
"timeout": 25,<br> "upload_dir": "/data/pvw/upload",<br> "fields": ["file", "host", "port", "updir"],<br> "port": 8080,<br>
"proxy_file": "/data/proxy.txt"<br> },<br> "properties": {<br> "python_path": "/data/pvw/iparaview/lib/paraview-4.1/site-packages",<br> "dataDir": "/data/pvw/data",<br>
"python_exec": "/data/pvw/paraview/bin/pvpython"<br> },<br> "apps": {<br> "data_prober": {<br> "cmd": [<br> "${python_exec}", "${python_path}/paraview/web/pv_web_data_prober.py",<br>
"--port", "${port}", "--data-dir", "${dataDir}"<br> ],<br> "ready_line" : "Starting factory"<br> },<br> "pipeline": {<br>
"cmd": [<br> "${python_exec}", "${python_path}/paraview/web/pv_web_visualizer.py",<br> "--port", "${port}", "--data-dir", "${dataDir}"<br>
],<br> "ready_line" : "Starting factory"<br> },<br> "loader": {<br> "cmd": [<br> "${python_exec}", "${python_path}/paraview/web/pv_web_file_loader.py",<br>
"--port", "${port}", "--data-dir", "${dataDir}"<br> ],<br> "ready_line" : "Starting factory"<br> }<br> }<br> }<br><br></div><div>
<br></div>I did find an error in my vhost conf file so it now appears as follow:<br><br><VirtualHost *:80><br> ServerAlias <a href="http://paraview.domain.ca" target="_blank">paraview.domain.ca</a><br> ServerAdmin <a href="mailto:webmaster@domain.ca" target="_blank">webmaster@domain.ca</a><br>
DocumentRoot /data/pvw/www<br><br> ErrorLog /data/logs/error.log<br> CustomLog /data/logs/access.log combined<br><br> # Handle launcher forwarding<br> ProxyPass /paraview <a href="http://paraview.domain.ca:8080/paraview" target="_blank">http://paraview.domain.ca:8080/paraview</a><br>
<br> # Handle WebSocket forwarding<br> RewriteEngine On<br> RewriteMap session-to-port txt:/data/proxy.txt<br> RewriteCond %{QUERY_STRING} ^sessionId=(.*)$ [NC]<br> RewriteRule ^/proxy.*$ ws://${session-to-port:%1}/ws [P]<br>
<br> <Directory "/data/pvw/www"><br> Options Indexes FollowSymLinks<br> Order allow,deny<br> Allow from all<br> AllowOverride all<br> Require all granted<br> </Directory><br>
</VirtualHost><br><br></div>I am getting closer. I think. Now when I load the page I am seeing a popup error: "Session did not properly started"<br><br></div>Thank you for giving this your attention.<br>
</div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 12:01 PM, Scott Wittenburg <span dir="ltr"><<a href="mailto:scott.wittenburg@kitware.com" target="_blank">scott.wittenburg@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">At first glance, this doesn't seem right:<div><br></div><div>ws://<a href="http://192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2" target="_blank">192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2</a><br>
</div><div><br></div><div>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.</div>
<div><br></div><div>But it will help to see your configurations.</div><div><br></div><div>Cheers,</div><div>Scott</div><div><br></div>
</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 9:43 AM, Scott Wittenburg <span dir="ltr"><<a href="mailto:scott.wittenburg@kitware.com" target="_blank">scott.wittenburg@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<div>
<br></div><div>Thanks,</div><div>Scott</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Tue, Jun 17, 2014 at 12:21 PM, CLSA Mcmaster <span dir="ltr"><<a href="mailto:clsamcmaster@gmail.com" target="_blank">clsamcmaster@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>Hello<br><br></div>I feel I am very close to getting this but I need some help.<br>
<br></div>
I am using Paraview with Python and an Apache front end with proxying. My logs show as follows:<br>
<br>[Tue Jun 17 14:18:34.353847 2014] [proxy:debug] [pid 5840] proxy_util.c(2035): AH00943: http: has released connection for (<a href="http://dragonfly.domain.ca" target="_blank">dragonfly.domain.ca</a>)<br>[Tue Jun 17 14:18:34.353905 2014] [deflate:debug] [pid 5840] mod_deflate.c(764): [client <a href="http://192.168.1.9:45352" target="_blank">192.168.1.9:45352</a>] AH01384: Zlib: Compressed 246 to 151 : URL /paraview/, referer: <a href="http://paraview.domain.ca/apps/FileViewer/" target="_blank">http://paraview.domain.ca/apps/FileViewer/</a><br>
[Tue Jun 17 14:18:34.366482 2014] [authz_core:debug] [pid 5843] mod_authz_core.c(828): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH01628: authorization result: granted (no directives)<br>
[Tue Jun 17 14:18:34.366557 2014] [proxy:debug] [pid 5843] mod_proxy.c(1104): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH01143: Running scheme ws handler (attempt 0)<br>
[Tue Jun 17 14:18:34.366566 2014] [proxy_ajp:debug] [pid 5843] mod_proxy_ajp.c(708): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH00894: declining URL ws://<a href="http://192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2" target="_blank">192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2</a><br>
[Tue Jun 17 14:18:34.366577 2014] [proxy_http:debug] [pid 5843] mod_proxy_http.c(1892): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH01113: HTTP: declining URL ws://<a href="http://192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2" target="_blank">192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2</a><br>
[Tue Jun 17 14:18:34.366583 2014] [proxy_wstunnel:debug] [pid 5843] mod_proxy_wstunnel.c(331): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH02451: serving URL ws://<a href="http://192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2" target="_blank">192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2</a><br>
[Tue Jun 17 14:18:34.366590 2014] [proxy:debug] [pid 5843] proxy_util.c(2020): AH00942: WS: has acquired connection for (*)<br>[Tue Jun 17 14:18:34.366596 2014] [proxy:debug] [pid 5843] proxy_util.c(2072): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH00944: connecting ws://<a href="http://192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2" target="_blank">192.168.1.110:9103/ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2</a> to <a href="http://192.168.1.110:9103" target="_blank">192.168.1.110:9103</a><br>
[Tue Jun 17 14:18:34.366665 2014] [proxy:debug] [pid 5843] proxy_util.c(2206): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH00947: connected /ws?sessionId=c83abd36-f64b-11e3-b1d5-14feb5ee4ae2 to <a href="http://192.168.1.110:9103" target="_blank">192.168.1.110:9103</a><br>
[Tue Jun 17 14:18:34.366800 2014] [proxy:debug] [pid 5843] proxy_util.c(2610): AH00962: WS: connection complete to <a href="http://192.168.1.110:9103" target="_blank">192.168.1.110:9103</a> (192.168.1.110)<br>[Tue Jun 17 14:18:34.<a href="tel:574643%202014" value="+15746432014" target="_blank">574643 2014</a>] [proxy_wstunnel:debug] [pid 5843] mod_proxy_wstunnel.c(253): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH02445: woke from poll(), i=1<br>
[Tue Jun 17 14:18:34.<a href="tel:574681%202014" value="+15746812014" target="_blank">574681 2014</a>] [proxy_wstunnel:debug] [pid 5843] mod_proxy_wstunnel.c(262): [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH02446: sock was readable<br>
[Tue Jun 17 14:18:34.<a href="tel:574725%202014" value="+15747252014" target="_blank">574725 2014</a>] [proxy_wstunnel:debug] [pid 5843] mod_proxy_wstunnel.c(129): (104)Connection reset by peer: [client <a href="http://192.168.1.9:45354" target="_blank">192.168.1.9:45354</a>] AH02442: error on sock - ap_get_brigade<br>
[Tue Jun 17 14:18:34.<a href="tel:574751%202014" value="+15747512014" target="_blank">574751 2014</a>] [proxy:debug] [pid 5843] proxy_util.c(2035): AH00943: WS: has released connection for (*)<br><br></div>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.<br>
<div><div><br></div></div></div>
<br></div></div>_______________________________________________<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></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>