ParaViewWeb on EC2 instance

Dear all,
I’m new in this forum and I hope that following the threads and discussing with the most expert users I can learn something useful to improve my skills in using Paraview.
I always used ParaView as a standalone application and now I’m trying to use the ParaViewWeb version.

I have an active EC2 instance on AWS and I’m following this example for the OSMesa:

Everything works fine, however when it comes to the end, to try the application nothing happens.

I have some questions:

  1. Is it correct to run the docker image as following? I put the target folder in the -v option and the IP address in place of xxx.xxx.xxx.xxx however I don’t know the port to be specified…
    sudo docker run
    -p 127.0.0.1:8081:80
    -v /home/ubuntu/data
    -e “SERVER_NAME=xxx:xxx:xxx:xxx”
    -e “PROTOCOL=ws”
    -ti kitware/paraviewweb:pvw-visualizer-osmesa-5.5.0

  2. When I run the previous command I get this message. Is it correct?
    Starting/Restarting Apache webserver

  • Restarting Apache httpd web server apache2
    AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message
    [ OK ] Starting the wslink launcher OK
  1. Finally, when I try to run the visualizer, using the url http://xxx.xxx.xxx.xxx/visualizer the site is unreachable.

Where am I wrong?
Thanks,
whiteW

Hi,
Is it actually possible to use paraViewWeb on an aws ec2 instance?
Are there alternative procedures to the one mentioned in the link?
Thank you,
whiteW

That image is a pretty old one, so I’m not sure that is the way to run it. But if the doc refer to it, I should be fine.

And yes, running pvw apps on ec2 is pretty straight forward. Usually it takes 30 minutes to setup thanks to the usage of docker. The remaining is just being coherent with the network configuration.

In general I would start with that one and then refer on your doc on how to setup Apache on the front of docker to do http(s)/ws(s).

Also, I will debug it locally and then deploy it on ec2.

Hello Sebastian, thanks for the answer.
I’m following the instruction in your link.
First I solved an error about the fact that docker required a usergroup to be run.
Then, giving the commands reported in the README of the github repository I got an error regarding the images of docker. When I run:

*docker run \*
*  -v $pvDir/paraviewweb-demo-master/pvw:/pvw \*
*  -v $pvDir/ParaViewData-v4.1/Data:/data \*
*  -p 0.0.0.0:9000:80 \*
*  -e SERVER_NAME="${DEMO_HOST}:${DEMO_PORT}" \*
*  -e PROTOCOL="ws" \*
*  -ti ${IMAGE_TO_RUN}*

I get:

Unable to find image ‘pvw-v5.7.1-egl-py3:latest’ locally
docker: Error response from daemon: pull access denied for pvw-v5.7.1-egl-py3, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied.
See ‘docker run --help’.

Is the image name reported in the instruction correct? Have I to download it from somewhere before runing doker?

Thanks!
whiteW

Those image belong to Docker Hub

Hi,
in the link there is a only command,
docker pull kitware/paraview

if I use it I get:

Using default tag: latest
Error response from daemon: manifest for kitware/paraview:latest not found: manifest unknown: manifest unknown

The page reports:
The Dockerfiles are hosted on the [ParaView Superbuild repository]. Additional information on how to use the ParaViewWeb image can be found on the [ParaViewWeb web site].

What am I supposed to do? Cloning the repository in my local computer?
Is there a step-by-step guide on how to configure paraviewWeb?
Thanks,
whiteW

So you need to combine both the Kitware/ParaView namespace with the tag pvw-v5.7.1-egl-py3.

Therefore when you want to select that specific image you need to provide the full path: kitware/paraview:pvw-v5.7.1-egl-py3

The benefit of the link that I provided before was for you to see all the versions and options you have in term of which image you want to use. With this query, you get the list of the ParaViewWeb images. For instance, once 5.10 will be release, we will have an image for it right there…

Hi Sebasten,
Thanks for your help.
Now I think docker is installed correctly, the error about the paraviewweb image disappeared.

However I’m still not able to view the landing page.
This is the command I’m running on the server:

sudo docker run                                \
>     -p 127.0.0.1:8081:80                        \
>     -v /home/ubuntu/paraviewweb-docker/testsite/:/data               \
>     -e "SERVER_NAME=172.38.0.220"  \
>     -e "PROTOCOL=ws"                               \
>     -ti kitware/paraviewweb:pvw-visualizer-osmesa-5.5.0

The webserver seems to start even if this message appears.

Starting/Restarting Apache webserver

  • Restarting Apache httpd web server apache2 AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message
    [ OK ]
    Starting the wslink launcher

Finally when I point my browser to:
http://172.38.0.220/visualizer

The site is unreachable, I get:

The server at 172.31.0.229 is taking too long to respond.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Thanks,
whiteW

The documentation say

  -v /path/to/demo/paraviewweb-demo-master/pvw:/pvw \
  -v /path/to/demo/ParaViewData-v4.1/Data:/data \

and you have

-v /home/ubuntu/paraviewweb-docker/testsite/:/data  

That just mean, you did not deploy any application inside /pvw.

Hello Sebastien,
I’m a bit confused… I’m following the two guides in the two links.

  1. in the link about paraviewweb on ec2 that I was following before, it is written to create a simple landing page in the file:

“home/ubuntu/paraviewweb-docker/testsite/www/index.html”

Then it is written:

Do not forget to replace with some real directory where your datasets are located

So I put the “testsite” folder in the docket specification.

-v <host-data -directory>:/data

as:

-v /home/ubuntu/paraviewweb-docker/testsite/:/data

In that “testsite” folder I also have a state of paraview that visualize a simple box, I can visualize it with classic Paraview.

The resulting docker comand is:

sudo docker run                                \
     -p 127.0.0.1:8081:80                        \
     -v /home/ubuntu/paraviewweb-docker/testsite:/data               \
     -e "SERVER_NAME=172.31.0.229"  \
     -e "PROTOCOL=ws"                               \
     -ti kitware/paraviewweb:pvw-visualizer-osmesa-5.5.0

In the guide there is not an instruction about “deploy an application inside /pvw”.… Where is this “pvw” folder?
Using the previous procedure (I removed the last slash after testsite) the docker image is found but there is the error of my last message.

  1. On the other hand, If I follow the instrucion of your second link there these folders are downloaded using curl.

The paraview image in docker image should be ok, then I’m using the following bash script:

export IMAGE_TO_RUN="kitware/paraview:pvw-v5.7.1-egl-py3"
export DEMO_HOST=172.31.0.229
export DEMO_PORT=9000

pathDemo='/home/ubuntu/paraview_web/demo'
mkdir -p $pathDemo
cd $pathDemo
curl -OL https://github.com/Kitware/paraviewweb-demo/archive/master.zip
unzip master.zip
curl -OL https://www.paraview.org/files/v4.1/ParaViewData-v4.1.0.zip
unzip ParaViewData-v4.1.0.zip

docker run \
        -v $pathDemo/paraviewweb-demo-master/pvw:/pvw \
        -v $pathDemo/ParaViewData-v4.1/Data:/data \
        -p 0.0.0.0:9000:80 \
        -e SERVER_NAME="${DEMO_HOST}:${DEMO_PORT}" \
        -e PROTOCOL="ws" \
        -ti ${IMAGE_TO_RUN}

However I’m getting a similar message:

Backing up /etc/apache2/sites-available/001-pvw.conf to /etc/apache2/sites-available/001-pvw.conf.BAK
Starting/Restarting Apache webserver

  • Restarting Apache httpd web server apache2
    AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message
    [ OK ] Starting the wslink launcher

And the website

http://172.31.0.229/visualizer

gives nothing.

Thanks for your help,
whiteW

Based on what you just did, you should be able to connect to http://172.31.0.229:9000/ and that should give you the demo landing page. At that point that is what the docker is giving you.

Then the first documentation is telling you how to setup apache on the front to serve your docker on port 80 or 443. But first you need to validate that your docker part is working as expected. Otherwise it will be hard to tell which part of the two is missing something.

HTH

Hello Sebastien,
Thanks for the tips, I finally succeeded in running ParaViewWeb on two local PC (PC1 and PC2).
Now I can start the server and access ParaViewWeb from my browser, if the I use a the PC where the server starts.

I’m still not able to run paraViewWeb on PC1 and access the website from PC2 (both are on my internal Lan).
This is what I’m doing:

  1. Run paraViewWeb on PC1 using the following command:
export IMAGE_TO_RUN="kitware/paraview:pvw-v5.7.1-osmesa-py3"

    export DEMO_HOST=192.168.0.173
    export DEMO_PORT=9000

    demoP='/home/nab03/REPO/pv_web'
    dataP='/home/nab03/REPO/hous/sim_15/postProcessing/cuttingPlane/'
    cd $demoP

    sudo docker run \
         -v $demoP/paraviewweb-demo-master/pvw:/pvw \
         -v $dataP:/data \
         -p 0.0.0.0:9000:80 \
         -e SERVER_NAME="${DEMO_HOST}:${DEMO_PORT}" \
         -e PROTOCOL="ws" \
         -ti ${IMAGE_TO_RUN}

I’m getting the usual warning form Apache so I connect to the URL in the warning:
http://172.17.0.2/visualizer/

  1. If I open the browser and point the url in PC1 ParaViewWeb starts and everything seems to work.

  2. Now if I try to connect to the same url from PC2 I get:

Loading Paraview …

Server Disconnected …

  1. If I add the port number on the url:
    http://172.17.0.2:9000/visualizer/

From PC2 I get:

Unable to connect
Firefox can’t establish a connection to the server at 172.17.0.2:9000.

The same happens if I run ParaViewWeb with the same setting on PC2 and try to connect the site from PC1.

I think I’m missing something related to the port or to the correct urls.
Thanks for the help.
whiteW

I don’t understand why you setup DEMO_HOST=192.168.0.173 if you are connecting to http://172.17.0.2:9000. The SERVER_NAME part is to define where you can reach the server back. It should be the same name/ip as the one you use to connect.

Hello Sebastien
I’m using it because when I run the docker command I get this warning from Apache:

Backing up /etc/apache2/sites-available/001-pvw.conf to /etc/apache2/sites-available/001-pvw.conf.BAK
Starting/Restarting Apache webserver

  • Restarting Apache httpd web server apache2 AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message
    [ OK ]

So If I try to connect to the server name that I specified as DEMO_HOST=192.168.0.166 I get:

Unable to connect

Firefox can’t establish a connection to the server at 192.168.0.166.

On the other hand, if I connect to the ip given by the warning (172.17.0.2) paraViewWeb starts, but it works only on the computer where the server run.

In my ifconfig I have the following IPs:

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255

enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.166 netmask 255.255.255.0 broadcast 192.168.0.255

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0

vethfba5fb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::ace4:94ff:fe45:7c06 prefixlen 64 scopeid 0x20

Which one should I use?

whiteW

It seems that your host ip is 192.168.0.166 which should be the ip to use to connect to your service along within SERVER_NAME.