<div dir="ltr">First of all, if you are using apache as a front-end, you should connect on port 80 not 9000. Otherwise, that means that you are using Jetty as your web server not apache.<div><br></div><div>Moreover, you've asked Jetty to tell the client to connect to "viz.local" which is supposed to be the exact same URL that you are starting with and not <a href="http://localhost:9000/xxxx">http://localhost:9000/xxxx</a>.</div>
<div><br></div><div>On top of that, can Jetty write/create that file? /opt/apache-2.4.7/pv-mapping-file/mapping.txt</div><div>And can apache read it?</div><div><br></div><div>What you should try for your local test:</div>
<div><br></div><div>1) Fix the pw-config.properties</div><div><br></div><div>pw.factory.session.url.generator.pattern=ws://viz.local/proxy?sessionId=SESSION_ID<br></div><div>==> pw.factory.session.url.generator.pattern=ws://localhost/proxy?sessionId=SESSION_ID</div>
<div><br></div><div>(I'm assuming the rest of the path are OK and ParaView works on that machine.</div><div><br></div><div>2) Connect with firefox and firebug open to <a href="http://localhost/apps/Visualizer">http://localhost/apps/Visualizer</a></div>
<div><br></div><div>3) Check what is happening in the console, Â /opt/apache-2.4.7/pv-mapping-file/mapping.txt file and the content of the directory /home/pvweb/ParaView/launcher/logs</div><div><br></div><div>Seb</div><div>
<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 9:54 PM, kai liu <span dir="ltr"><<a href="mailto:liuwukai@yahoo.com" target="_blank">liuwukai@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:8pt;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif"><div>
<span style="font-size:13px">Hi</span></div><div><span style="font-size:small"><br></span></div><div style="font-style:normal;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px"><span style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">I complied offscreen OSMesa ParaViewWeb, but I do not know how to use Apache as front-end. I have followed both "</span><font><a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/apache_setup" target="_blank">How to use Apache as Frotn-end</a></font>" and "<a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/paraviewweb_on_aws_ec2" target="_blank">How
 to set up an Amazon EC2 AMI instance to run ParaViewWeb</a>" guides, but I could not get it to work. </span></div><div style="font-style:normal;background-color:transparent"><span style="font-size:13px"><br></span></div>
<div style="font-size:13px;font-style:normal;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif"><span style="font-size:13px">I run the command "java -jar JettySessionManager-Server-1.1.jar pw-config.properties", and then I input the link Â <a href="http://localhost:9000/apps/Visualizer," target="_blank">http://localhost:9000/apps/Visualizer</a> on the browser. I always got the following error:</span></div>
<div style="font-size:13px;font-style:normal;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif"><span style="font-size:13px"><br></span></div>
<div style="background-color:transparent"><span style="font-size:13px">2014-04-16 23:45:23.355:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT</span></div><div style="background-color:transparent"><span style="font-size:13px">2014-04-16 23:45:23.487:INFO:oejs.AbstractConnector:Started <a href="http://SelectChannelConnector@0.0.0.0:9000" target="_blank">SelectChannelConnector@0.0.0.0:9000</a></span></div>
<div style="background-color:transparent"><span style="font-size:13px">Apr 16, 2014 11:45:37 PM com.kitware.paraviewweb.websocket.WebSocketForwarder onOpen </span><span style="font-size:13px;background-color:transparent">INFO: null</span></div>
<div style="background-color:transparent"><span style="font-size:13px">java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused</span></div><div style="background-color:transparent"><span style="font-size:13px"><span style="white-space:pre-wrap">        </span>at org.eclipse.jetty.websocket.WebSocketClient$WebSocketFuture.get(WebSocketClient.java:569)</span></div>
<div style="background-color:transparent"><span style="font-size:13px"><span style="white-space:pre-wrap">      </span>at org.eclipse.jetty.websocket.WebSocketClient$WebSocketFuture.get(WebSocketClient.java:372)</span></div><div style="background-color:transparent">
<span style="font-size:13px"></span></div><div style="background-color:transparent"><span style="font-size:13px"><span style="white-space:pre-wrap">        </span>at
 com.kitware.paraviewweb.websocket.WebSocketForwarder.onOpen(WebSocketForwarder.java:54)</span></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px">..........................</span></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px">..........................</span></div><div><br></div><div style="font-style:normal;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:small"> </span></div><div><span style="font-size:13px">  I feel I did not missed any steps while following the </span><span style="font-size:13px"> "</span><a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/paraviewweb_on_aws_ec2" style="font-size:13px" target="_blank">How to set up an Amazon EC2 AMI instance to run ParaViewWeb</a><span style="font-size:13px">" guide, but I always get the above error when I run it. I use </span><span style="font-size:13px">apache-2.4.9 since I could not find apache-2.4.7 online. I attached </span><span style="font-size:13px">pw-config.properties. Â I run everything on Localhost first because I do not want to screw up my Amazon EC2 instance. </span></div>
<div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif"><span style="font-size:13px"><br></span></div>
<div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif"><span style="font-size:13px"><br></span></div>
<div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif"><span style="font-size:13px">Is it okay to put </span><span style="background-color:rgb(247,247,247);font-family:Menlo,'Courier New',Courier,monospace;line-height:13px;white-space:pre-wrap">ServerName <a href="http://127.0.1.1/" target="_blank">127.0.1.1</a> instead of my instance DNS name since I am running on localhost? Thank you!</span></div>
<div><span style="font-size:13px"><br></span></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px"></span></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);background-color:rgb(247,247,247);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;overflow-x:auto;overflow-y:hidden;font-size:13px">
<code style="margin-top:0px;margin-bottom:0px;padding:0px;font-style:inherit;font-weight:inherit;font-family:Menlo,'Courier New',Courier,monospace;line-height:13px"><span style="color:rgb(0,0,136)"><VirtualHost</span><span style="color:rgb(0,0,0)"> *:80</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
    ServerName <a href="http://ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com" target="_blank">ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com</a>
    ServerAdmin <a href="mailto:webmaster@example-host.example.com" target="_blank">webmaster@example-host.example.com</a>
    DocumentRoot "/var/www/pvweb-deploy/www"
    ErrorLog "logs/pv-error_log"
    CustomLog "logs/pv-access_log" common

    ProxyPass /paraview <a href="http://localhost:9000/paraview" target="_blank">http://localhost:9000/paraview</a>

    # Turn on the rewrite engine
    RewriteEngine On

    # This is the path the mapping file Jetty creates
    RewriteMap session-to-port txt:/opt/apache-2.4.7/pv-mapping-file/mapping.txt

    # This is the rewrite condition. Look for anything with a sessionId= in the query part of the URL and capture the value to use below.
    RewriteCond %{QUERY_STRING}     ^sessionId=(.*)$ [NC]

    # This does the rewrite using the mapping file and the sessionId
    RewriteRule    ^/proxy.*$  ws://${session-to-port:%1}/ws  [P]

    </span><span style="color:rgb(0,0,136)"><Directory</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,136,0)">"/var/www/pvweb-deploy/www"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
        Options Indexes FollowSymLinks
        Order allow,deny
        Allow from all
        AllowOverride None
        Require all granted
    </span><span style="color:rgb(0,0,136)"></Directory></span><span style="color:rgb(0,0,0)">

</span><span style="color:rgb(0,0,136)"></VirtualHost></span></code></pre><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px"><br></span></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px"><br></span></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif">
<span style="font-size:13px"><br></span></div><div><br></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://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>