# ParaViewWeb on EC2 instance

**URL:** https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402
**Category:** Web Support
**Created:** [November 14, 2021, 7:10pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402 "2021-11-14T19:10:16Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 14, 2021, 7:10pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/1 "2021-11-14T19:10:16Z")

</div>

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:

> **[ParaViewWeb](https://kitware.github.io/paraviewweb/docs/ec2.html)**
>
> ParaViewWeb on EC2We have built Docker images containing ParaView 5.5 which support ParaViewWeb applications. These images currently come in two flavors: One for NVidia GPUs w/ EGL rendering support,

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](http://xxx.xxx.xxx.xxx/visualizer) the site is unreachable.

Where am I wrong?  
Thanks,  
whiteW

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 16, 2021, 7:42am UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/2 "2021-11-16T07:42:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 17, 2021, 10:42pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/3 "2021-11-17T22:42:23Z")

</div>

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](https://github.com/Kitware/paraviewweb-demo) 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.

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 18, 2021, 9:08am UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/4 "2021-11-18T09:08:47Z")

</div>

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:

```auto
*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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 18, 2021, 3:28pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/5 "2021-11-18T15:28:44Z")

</div>

Those image belong to [Docker Hub](https://hub.docker.com/r/kitware/paraview)

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 18, 2021, 3:37pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/6 "2021-11-18T15:37:57Z")

</div>

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

if I use it I get:

```auto
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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 18, 2021, 4:29pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/7 "2021-11-18T16:29:20Z")

</div>

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](https://hub.docker.com/r/kitware/paraview/tags?page=1&name=pvw), 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…

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 19, 2021, 9:18am UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/8 "2021-11-19T09:18:56Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 19, 2021, 3:07pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/9 "2021-11-19T15:07:33Z")

</div>

The documentation say

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

```

and you have

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

```

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

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 20, 2021, 10:00am UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/10 "2021-11-20T10:00:01Z")

</div>

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:

```auto
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:

```auto
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](http://172.31.0.229/visualizer)

gives nothing.

Thanks for your help,  
whiteW

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 22, 2021, 3:46pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/11 "2021-11-22T15:46:14Z")

</div>

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

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 23, 2021, 8:24am UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/12 "2021-11-23T08:24:15Z")

</div>

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:

```auto
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/](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/](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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 23, 2021, 4:09pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/13 "2021-11-23T16:09:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![whiteW](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/a87d85/32.png) [@whiteW](https://discourse.paraview.org/u/whiteW)
#### Post date: [November 23, 2021, 6:19pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/14 "2021-11-23T18:19:51Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 23, 2021, 8:25pm UTC](https://discourse.paraview.org/t/paraviewweb-on-ec2-instance/8402/15 "2021-11-23T20:25:50Z")

</div>

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`.
