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

kai liu liuwukai at yahoo.com
Fri Apr 18 01:00:15 EDT 2014


Hi Sebastien,

I changed pw-config.properties file's pw.web.port=80 since I want to use Apache as front-end. I fixed pw.factory.session.url.generator.pattern=ws://viz.local/proxy?sessionId=SESSION_ID. When I run java -jar JettySessionManager-Server-1.1.jar pw-config.properties, I got the following errors:

==== Starting ParaViewWeb multi-user front-end ====
Configuration: /home/kai/Desktop/ParaViewWeb/pw-config.properties
WebContent: /var/www/pvweb-deploy/www
Port: 80
===================================================

2014-04-18 00:35:33.281:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
2014-04-18 00:35:33.435:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector at 0.0.0.0:80: java.net.SocketException: Permission denied
java.net.SocketException: Permission denied

at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)


If I set pw-config.properties file's pw.web.port=8080, the result for opt/apache-2.4.7/pv-mapping-file/mapping.txt:

                      {"f6ac78f2-4c2c-4da2-ae33-a0b514a5ea1e":{"host":"localhost","port":9100}}




and home/pvweb/ParaView/launcher/logs has the following output


/home/kai/Desktop/ParaViewWeb/build/lib/site-packages/zope/__init__.py:3: UserWarning: Module twisted was already imported from /home/kai/Desktop/ParaViewWeb/build/lib/site-packages/twisted/__init__.pyc, but /usr/local/lib/python2.7/dist-packages/Twisted-13.1.0-py2.7-linux-i686.egg is being added to sys.path
  import pkg_resources


I believe  Jetty can write/create. When you said run as http://localhost/apps/Visualizer, shouldn't it be http://localhost:8080/apps/Visualizer if I have pw.web.port=8080. http://localhost/apps/Visualizer give me page cannot found. 

I am so sorry if I misinterpret anything. Thank you for your patient ! 



Kai 



------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

On Thursday, April 17, 2014 1:11 AM, Sebastien Jourdain <sebastien.jourdain at kitware.com> wrote:
 
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" and "How to set up an Amazon EC2 AMI instance to run ParaViewWeb" 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 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" 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/20140417/b6dcc989/attachment-0001.html>


More information about the ParaView mailing list