[Paraview] Apache Front-end not working: java.net.ConnectException: Connection refused

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Apr 17 01:11:24 EDT 2014


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.

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 http://localhost:9000/xxxx.

On top of that, can Jetty write/create that
file? /opt/apache-2.4.7/pv-mapping-file/mapping.txt
And can apache read it?

What you should try for your local test:

1) Fix the pw-config.properties

pw.factory.session.url.generator.pattern=ws://viz.local/proxy?sessionId=SESSION_ID
==> pw.factory.session.url.generator.pattern=ws://localhost/proxy?sessionId=SESSION_ID

(I'm assuming the rest of the path are OK and ParaView works on that
machine.

2) Connect with firefox and firebug open to http://localhost/apps/Visualizer

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

Seb




On Wed, Apr 16, 2014 at 9:54 PM, kai liu <liuwukai at yahoo.com> wrote:

> Hi
>
> I complied offscreen OSMesa ParaViewWeb, but I do not know how to use
> Apache as front-end. I have followed both "How to use Apache as Frotn-end<http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/apache_setup>"
> and "How to set up an Amazon EC2 AMI instance to run ParaViewWeb<http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/paraviewweb_on_aws_ec2>"
> guides, but I could not get it to work.
>
> I run the command "java -jar JettySessionManager-Server-1.1.jar
> pw-config.properties", and then I input the link
> http://localhost:9000/apps/Visualizer<http://localhost:9000/apps/Visualizer,> on
> the browser. I always got the following error:
>
> 2014-04-16 23:45:23.355:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
> 2014-04-16 23:45:23.487:INFO:oejs.AbstractConnector:Started
> SelectChannelConnector at 0.0.0.0:9000
> Apr 16, 2014 11:45:37 PM
> com.kitware.paraviewweb.websocket.WebSocketForwarder onOpen INFO: null
> java.util.concurrent.ExecutionException: java.net.ConnectException:
> Connection refused
> at
> org.eclipse.jetty.websocket.WebSocketClient$WebSocketFuture.get(WebSocketClient.java:569)
> at
> org.eclipse.jetty.websocket.WebSocketClient$WebSocketFuture.get(WebSocketClient.java:372)
> at
> com.kitware.paraviewweb.websocket.WebSocketForwarder.onOpen(WebSocketForwarder.java:54)
> ..........................
> ..........................
>
>
>   I feel I did not missed any steps while following the  "How to set up
> an Amazon EC2 AMI instance to run ParaViewWeb<http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/paraviewweb_on_aws_ec2>"
> guide, but I always get the above error when I run it. I use apache-2.4.9
> since I could not find apache-2.4.7 online. I attached pw-config.properties.
>  I run everything on Localhost first because I do not want to screw up my
> Amazon EC2 instance.
>
>
> Is it okay to put ServerName 127.0.1.1 instead of my instance DNS name
> since I am running on localhost? Thank you!
>
> <VirtualHost *:80>
>     ServerName ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
>     ServerAdmin webmaster at example-host.example.com
>     DocumentRoot "/var/www/pvweb-deploy/www"
>     ErrorLog "logs/pv-error_log"
>     CustomLog "logs/pv-access_log" common
>
>     ProxyPass /paraview http://localhost:9000/paraview
>
>     # 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]
>
>     <Directory "/var/www/pvweb-deploy/www">
>         Options Indexes FollowSymLinks
>         Order allow,deny
>         Allow from all
>         AllowOverride None
>         Require all granted
>     </Directory>
> </VirtualHost>
>
>
>
>
>
>
> _______________________________________________
> 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://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140416/b6790c8c/attachment.html>


More information about the ParaView mailing list