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

Sebastien Jourdain sebastien.jourdain at kitware.com
Tue May 20 20:45:38 EDT 2014


Here is the version that I wrote:
http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/ubuntu_14_04


On Tue, Apr 22, 2014 at 8:59 PM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:

> Yes that is my plan, but I don't know when I'll get a chance to do it.
> (couple of weeks)
> For now you may look here:
> https://bitbucket.org/terafrac/pvconfs/wiki/Home
>
> Seb
>
>
> On Tue, Apr 22, 2014 at 8:06 PM, kai liu <liuwukai at yahoo.com> wrote:
>
>> Hi Sebastien,
>>
>> Great. Thank you in advance.  Are you going to post the new doc on this
>> page http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/  once you
>> have it ready? Do you know when you might have it ready by any chance?
>> Thank you!
>>
>> Kai
>>
>>   On Saturday, April 19, 2014 4:04 PM, Sebastien Jourdain <
>> sebastien.jourdain at kitware.com> wrote:
>>  I don't know the exact match for ubuntu Package, but I should be able
>> to right some new doc with the latest 14 LTS ubuntu.
>>
>> Seb
>>
>>
>> On Sat, Apr 19, 2014 at 12:11 AM, kai liu <liuwukai at yahoo.com> wrote:
>>
>> Hi Sebastien,
>>
>> I think ParaViewWeb finally work on my local machine. It seems that I
>> should not close my terminal after I run java -jar
>> JettySessionManager-Server-1.1.jar pw-config.properties &  in the
>> background. If I close the terminal, the http://localhost/apps/Visualizer does
>> not work anymore. Is there anyway to solve this?
>>
>> I have apache 2.2 (From Lampstack, in etc/apache2 directory) and apache
>> 2.4.9 (For ParaViewWeb, in /opt/apache2.4.9 directory). Is it possible
>> for me to run ParaViewWeb on apache 2.2? If not, Is it possible to update
>> apache 2.2 to apache 2.4.9 perhaps? I have searched through online, but I
>> could not find anything helpful.
>>
>> I am almost ready to deploy ParaViewWeb to an Amazon EC2 Instance, and
>> the server uses Ubuntu. On "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>"
>> I believe some commands are based on RedHat Linux system.
>>
>>
>> $ sudo yum install patch.x86_64
>> $ sudo yum install pcre-devel.x86_64
>> $ sudo yum install mesa-libGLU.x86_64
>> $ sudo yum install xorg*$ sudo nvidia-config
>>
>>
>>  Do you know what are the Ubuntu commands for these packages? I tried sudo
>> apt-get install XXXXX for all of these, but they don't seem to work.
>> Thank you!
>>
>> Kai
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>   On Friday, April 18, 2014 10:58 AM, Sebastien Jourdain <
>> sebastien.jourdain at kitware.com> wrote:
>>   Hi Kai,
>>
>> both apache and jetty are a web server, and you can only have one process
>> using the port 80.
>> So if you want apache to be the web server, you need jetty to pick
>> something else than port 80 (and it can be anything).
>> The only thing is that apache need to be aware on which port jetty is
>> running so it could forward all the launch request to jetty which is in the
>> config that you wrote for apache with port 8080...
>>
>>  Seb
>>
>>
>>
>> On Thu, Apr 17, 2014 at 11:00 PM, kai liu <liuwukai at yahoo.com> wrote:
>>
>> 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<http://SelectChannelConnector@0.0.0.0/>:
>> 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 <http://localhost/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<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 <http://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/20140520/ae3b4c2f/attachment-0001.html>


More information about the ParaView mailing list