question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ParaviewWeb behind Nginx

See original GitHub issue

Hi everyone!

I have troubles getting a setup with paraview to work behind a nginx container. When I got to http://0.0.0.0/visualizer my connection times out.

My Docker stack:

version: "3.8"

services:
  paraview:
    image: kitware/paraviewweb:pvw-egl-demo-v5.6.0
    command: "ws://localhost:9000/"
    entrypoint: "/opt/paraviewweb/scripts/start.sh"

  nginx:
    image: nginx:stable-alpine
    ports:
      - 80:80
      - 443:443
    volumes:
    - $HOME/pwtest/nginx/conf.d:/etc/nginx/conf.d/
    - $HOME/pwtest/nginx/nginx.conf:/etc/nginx/nginx.conf

I have the following nginx configuration files:

# conf.d/http.conf
resolver 127.0.0.11;

server {
    listen 80;
    server_name *;
    proxy_read_timeout 3600s;

    location ~ /ws {
        proxy_set_header Host $host;
        proxy_pass http://paraview:80;
    }

    location / {
        proxy_set_header Host $host;
        proxy_pass http://paraview:80;
    }

}

server {
    listen 9000;
    server_name *;
    proxy_read_timeout 3600s;

    location ~ / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Connection $connection_upgrade;
        proxy_pass http://paraview:9000;
    }

}
# nginx.conf
user  root;
worker_processes  auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    map $http_upgrade $connection_upgrade {
	       	default upgrade;
	       	''      close;
	}

    # Log format
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

    # Access log
    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    # Set maximum file upload size
    client_max_body_size 500M;

    # Specific server blocks
    include /etc/nginx/conf.d/*.conf;

}

Did anyone successfully get paraview web to run behind nginx or can anyone see the issues with my setup? Thanks /Christian

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
ocni-dtucommented, Feb 15, 2021

On my local setup I can mix and match 0.0.0.0 and localhost. In the production settings I changed it to the right url. Locally I just used port 80 and http, so it worked as expected with ws. In production I use wss

0reactions
jourdaincommented, Feb 15, 2021

Perfect, I just wanted to clarify for anyone using that as reference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ParaViewWeb - Kitware, Inc.
ParaViewWeb, the JavaScript library, is a Web framework to build applications with interactive scientific visualization inside the Web ...
Read more >
Do I need to install the full Paraview just for ParaViewWeb?
I am only planning to use ParaViewWeb to serve vtk files in a web browser for ... With Trame, you will have to...
Read more >
ParaViewWeb 2.2 Eases App Development - Kitware Inc.
ParaViewWeb is a JavaScript library. It serves as a development framework that builds applications for web-based, interactive scientific ...
Read more >
BMCV/docker-paraviewweb - GitHub
This ParaViewWeb Docker container is used by the Galaxy Project. screenshot. Usage. Build your own image and run it. Docker is a pre-requirement...
Read more >
Cloud visualization service using ParaViewWeb
ParaView holds a leading position in data visualization, works with ... Nginx proxy all the WebSocket connections between users and ParaViewWeb instances.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found