Kitware / visualizer

The ParaViewWeb Visualizer application which can be used standalone or as a component within another web context.
https://kitware.github.io/visualizer/
BSD 3-Clause "New" or "Revised" License
115 stars 28 forks source link

ParaviewWeb and Amazon EC2 instance #71

Closed Shaileshbg1 closed 5 years ago

Shaileshbg1 commented 5 years ago

Hi,

Thanks to Jourdain I was able to set up Visualizer and load a state file on my local machine (Ubuntu 16.04). I am trying to have the same set up on an Amazon EC2 Ubuntu 16.04 server instance, without any GPU or display. I followed the set up as suggested by http://kitware.github.io/paraviewweb/docs/ubuntu_14_04.html using ParaView-5.6.0-osmesa-MPI-Linux-64bit.tar.gz binary. When I launch paraviewWeb using => http://IP_of_the_Amazon_instance/visualizer

I get the following error: [Fri Jan 18 05:34:48.541489 2019] [proxy_http:error] [pid 2721:tid 140617541936896] (70007)The timeout specified has expired: [client xx.xx.xx.xx:8522] AH01102: error reading status line from remote server localhost:8080, referer: http://xx.xx.xx.xx/?data=stateFile.pvsm [Fri Jan 18 05:34:48.541540 2019] [proxy:error] [pid 2721:tid 140617541936896] [client xx.xx.xx.xx:8522] AH00898: Error reading from remote server returned by /paraview/, referer: http://xx.xx.xx.xx/?data=stateFile.pvsm [Fri Jan 18 07:02:17.092040 2019] [proxy_http:error] [pid 6017:tid 140079620159232] (70007)The timeout specified has expired: [client xx.xx.xx.xx:7474] AH01102: error reading status line from remote server localhost:8080, referer: http://xx.xx.xx.xx/?data=stateFile.pvsm [Fri Jan 18 07:02:17.092090 2019] [proxy:error] [pid 6017:tid 140079620159232] [client xx.xx.xx.xx:7474] AH00898: Error reading from remote server returned by /paraview/, referer: http://xx.xx.xx.xx/?data=stateFile.pvsm

From this document: https://www.paraview.org/pipermail/paraview/2014-September/032085.html I understood that for instances without a graphics card, it is not possible to use the binary installation of Paraview and you'll need to compile ParaView yourself with support for OSMesa, following this documentation. https://www.paraview.org/Wiki/ParaView/ParaView_And_Mesa_3D

On another documentation, https://public.kitware.com/pipermail/paraview/2013-December/030237.html it was stated that: the machine should be able to run an x server. So, I tried to enable x11 forwarding by installing xorg using sudo apt-get install xorg openbox which successfully installed.

I am very new to this domain and the thought of building ParaView with the support of OSMesa from scratch is scary, is there a way to configure ParaView OSMesa binary to work with an EC2 instance without GPU and display? Like some configuration options where we can set DISPLAY to null, or something like this.

I am sorry for such a silly question, but I am completely new to this and any suggestion would be greatly appreciated.

Thanks and Regards, Shailesh

jourdain commented 5 years ago

You have some docker options if you like.

Shaileshbg1 commented 5 years ago

Hi Jourdain,

Thank you for your reply, I have tried that before and it works perfectly. I used the osmesa docker image as I do not have any graphics hardware set up for my EC2 instance. The documentation which I followed is: https://kitware.github.io/paraviewweb/docs/ec2.html

But, this gives me a hardcoded setup where there is only an option to load data directory. I want to set the Visualizer with a preloaded state file, so the user only has to select the filters he wants to see (slice, threshold, etc.) I want to make it like a switch on/off to the user as I cannot expect any further involvement from the end user.

So the docker set up was not suited to this requirement. I look forward to hearing back from you.

Thanks and regards, Shailesh

jourdain commented 5 years ago

Just create a new image specific to your use case that correspond to the last step like here or here.

By looking at them you should recognize what you've done locally to make things work.

Shaileshbg1 commented 5 years ago

Hi Jourdain,

Thank you very much for your response, I was able to build a specific docker image pertaining to my requirements. I will have to disturb you once again and ask your help with an issue I am struggling with.

On my local system, I prepare my workflow on paraview and save it is a state file, which I pass to visualizer for interactive visualization on the web. To automate this process I used the python trace functionality of paraview to save a trace file, which I invoke as a function in my simulation code.

But, I have a micro AWS instance on which it is not possible to have X connections. Now the python trace file which I have does not work in this setup and it returns an error "paraview: cannot connect to X server"

Is there any way in which I can set up my workflow and save it as a statefile on this setup or on the docker container built on osmesa. Thank you once again for your patience and I look forward to hearing back from you.

Regards, Shailesh

jourdain commented 5 years ago

If you use the osmesa docker image or the paraview-5.6-osmesa binary you will definitely be able to pre-process your data the way you are planning to do on that machine.

But I'm not sure if I actually answered your question.