Kitware / paraviewweb

Web framework for building interactive visualization relying on VTK or ParaView to produce visualization data
http://kitware.github.io/paraviewweb/
BSD 3-Clause "New" or "Revised" License
163 stars 51 forks source link

Color Management not working when selecting Local (VGL) and deprecated #316

Closed 0x3bfc closed 7 years ago

0x3bfc commented 7 years ago

Hello

Paraview-web is working very well using Remote rendering option but it has a rendering issue when using applying color management during Local(VGL) & Deprecated rendering options .... Nothing shown on server side form pvpython logs but console logs on client are shown below as following:

The connection to wss:///proxy?sessionId=19b310e8-d289-11e6-a786-000d3a132570 was interrupted while the page was loading. Firefox can’t establish a connection to the server at wss:///proxy?sessionId=19b310e8-d289-11e6-a786-000d3a132570.

autobahn.min.js:101 Uncaught session not open autobahn.min.js:114 WebSocket connection to 'wss://APACHE-SERVER/proxy?sessionId=f4d72bc8-d284-11e6-a786-000d3a132570' failed: Error during WebSocket handshake: Unexpected response code: 503 The same issue raised Google chrome Distributions: Ubuntu-14.04 LTS & MacOS-Sierra v10.12.2

Thanks, Ahmed

jourdain commented 7 years ago

Does the server crash? Which version of ParaView/Visualizer are you using?

I don't think we expose the WebGL rendering anymore with the latest Visualizer application. It will be back using vtk.js but in the mean time we removed it from the UI.

0x3bfc commented 7 years ago

No, the server doesn't crash ... I've used paraviewweb-2.2.58 and paraview-4.3 of visualizer

jourdain commented 7 years ago

The ParaViewWeb (JavaScript) library is meant to be used with ParaView 5+.

ParaView 4, is using WAMP v1 while ParaViewWeb and ParaView 5 are using WAMP v2. They are not compatible.

0x3bfc commented 7 years ago

I've compiled the source code of ParaView5.2, but after compilation I found the share directory empty... You can find below the tree of share directory under installation directory. user@localhost:/opt/ParaView/install/share$ tree . . └── cmake └── hdf5 └── libhdf5.settings

2 directories, 1 file

And here is the ParaView installation documentation I used os-mesa

But Compilation and installation using OSMESA works fine for ParaView4.3 Looking forward to hear from you

jourdain commented 7 years ago

Are you sure you've enabled the following property?

PARAVIEW_ENABLE_PYTHON      ON
0x3bfc commented 7 years ago

Yep!.... here is the CMakeCache.txt

jourdain commented 7 years ago

Actually that's expected, your ParaView is all set.

Now the Web (javascript/html/css) part belong to Visualizer/LightViz/ParaViewWeb.

So if you want Visualizer you just need to download it here: https://github.com/kitware/visualizer

The dist directory is the one you want to serve over HTTP and the server/pvw-visualizer.py is the script you want to run with pvpython.

0x3bfc commented 7 years ago

Good.. I've downloaded the Visualizer under share directory and configured the launcher to use the new pvw-visualizer.py ... the visualizer loads successfully and I can see data list of vtk files from Home panel .... but still have the issue of rendering over HTTPS (Find the error message below), even though I can see from netstat that port of web-socket starts when requesting the page!

**Visualizer.js:30** WebSocket connection to 'wss://APACHE-SERVER/proxy?sessionId=6688b736-d7f9-11e6-a34a-000d3a1219ebb' failed: Error during WebSocket handshake: Unexpected response code: 400 Visualizer.js:30 WebSocket is already in CLOSING or CLOSED state. Also you can get a snippet of pv-error.logs below

[Wed Jan 11 12:28:11.768075 2017] [proxy_wstunnel:error] [pid 48215:tid 140457661142784] [client 41.128.168.145:50000] AH02439: error parsing URL //: Invalid host/port
[Wed Jan 11 12:54:38.826156 2017] [proxy_wstunnel:error] [pid 48215:tid 140457585608448] [client 41.128.168.145:50215] AH02439: error parsing URL //: Invalid host/port

Please do note that I didn't change Apache configurations except the new DocumentRoot path of visualizer/dist

Finally I think the pvw-visualizer.py logs can help to figure out where is the issue

2017-01-11 12:54:37+0000 [HTTPChannel,0,13.92.115.204] Client has reconnected, cancelling reaper
2017-01-11 12:54:37+0000 [HTTPChannel,0,13.92.115.204] on_connect: connection count = 1
2017-01-11 12:54:38+0000 [HTTPChannel,0,13.92.115.204] Property BeginValueCapture has no GetData() method, skipping
2017-01-11 12:54:38+0000 [HTTPChannel,0,13.92.115.204] Property CaptureValuesFloat has no GetData() method, skipping
2017-01-11 12:54:38+0000 [HTTPChannel,0,13.92.115.204] Property CaptureZBuffer has no GetData() method, skipping
2017-01-11 12:54:38+0000 [HTTPChannel,0,13.92.115.204] Property EndValueCapture has no GetData() method, skipping
2017-01-11 12:54:38+0000 [HTTPChannel,0,13.92.115.204] Property StartCaptureLuminance has no GetData() method, skipping
2017-01-11 12:54:38+0000 [HTTPChannel,0,13.92.115.204] Property StopCaptureLuminance has no GetData() method, skipping
Generic Warning: In /home/azureuser/paraviewweb/ParaView/src/VTK/Rendering/Volume/vtkVolumeTextureMapper3D.cxx, line 682
vtkVolumeTextureMapper3D::vtkVolumeTextureMapper3D was deprecated for VTK 7.0 and will be removed in a future version.

Generic Warning: In /home/azureuser/paraviewweb/ParaView/src/VTK/Rendering/VolumeOpenGL/vtkOpenGLVolumeTextureMapper3D.cxx, line 57
vtkOpenGLVolumeTextureMapper3D::vtkOpenGLVolumeTextureMapper3D was deprecated for VTK 7.0 and will be removed in a future version.

2017-01-11 12:55:09+0000 [HTTPChannel,0,13.92.115.204] Property BeginValueCapture has no GetData() method, skipping
2017-01-11 12:55:09+0000 [HTTPChannel,0,13.92.115.204] Property CaptureValuesFloat has no GetData() method, skipping
2017-01-11 12:55:09+0000 [HTTPChannel,0,13.92.115.204] Property CaptureZBuffer has no GetData() method, skipping
2017-01-11 12:55:09+0000 [HTTPChannel,0,13.92.115.204] Property EndValueCapture has no GetData() method, skipping
2017-01-11 12:55:09+0000 [HTTPChannel,0,13.92.115.204] Property StartCaptureLuminance has no GetData() method, skipping
2017-01-11 12:55:09+0000 [HTTPChannel,0,13.92.115.204] Property StopCaptureLuminance has no GetData() method, skipping
2017-01-11 12:55:55+0000 [HTTPChannel,0,13.92.115.204] Property BeginValueCapture has no GetData() method, skipping
2017-01-11 12:55:55+0000 [HTTPChannel,0,13.92.115.204] Property CaptureValuesFloat has no GetData() method, skipping
2017-01-11 12:55:55+0000 [HTTPChannel,0,13.92.115.204] Property CaptureZBuffer has no GetData() method, skipping
2017-01-11 12:55:55+0000 [HTTPChannel,0,13.92.115.204] Property EndValueCapture has no GetData() method, skipping
2017-01-11 12:55:55+0000 [HTTPChannel,0,13.92.115.204] Property StartCaptureLuminance has no GetData() method, skipping
2017-01-11 12:55:55+0000 [HTTPChannel,0,13.92.115.204] Property StopCaptureLuminance has no GetData() method, skipping
jourdain commented 7 years ago

What are your apache and launcher config? I'm pretty sure it is a configuration issue.

0x3bfc commented 7 years ago

Kindly check out the apache_config and lanncher.conf

jourdain commented 7 years ago

Where did you get the documentation from? Just wondering so I can make sure to fix it.

Regarding your config here are the fixes:

<VirtualHost *:443>
    ServerName MYDOMAIN
    ServerAdmin admin@MYDOMAIN
    DocumentRoot "/opt/ParaView/install/share/visualizer/dist"
    ErrorLog "/opt/ParaView/logs/pv-error_log"
    CustomLog "/opt/ParaView/logs/pv-access_log" common
    ### The following commented lines could be useful when running
    ### over https and wss:
    SSLEngine On
    SSLCertificateFile    /opt/ParaView/keys/cert.pem
    SSLCertificateKeyFile /opt/ParaView/keys/privkey.pem
    SSLCertificateChainFile /opt/ParaView/keys/cert.pem
    #
    <Location "/opt/ParaView/install/share/visualizer/dist" >
       SSLRequireSSL On
       SSLVerifyClient optional
       SSLVerifyDepth 1
       SSLOptions +StdEnvVars +StrictRequire
    </Location>

    # Have Apache pass these requests to the launcher
    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/ParaView/pythonLauncher/mapping/proxy.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=(.*)&path=(.*)$ [NC]
    # This does the rewrite using the mapping file and the sessionId
    RewriteRule    ^/proxy.*$  ws://${session-to-port:%1}/%2  [P]

    <Directory "/opt/ParaView/install/share/visualizer/dist">
        Options Indexes FollowSymLinks
        Order allow,deny
        Allow from all
        AllowOverride None
        Require all granted
    </Directory>

</VirtualHost>
{

  "configuration": {
    "host" : "0.0.0.0",
    "port" : 9000,
    "endpoint": "paraview",
    "proxy_file" : "/opt/ParaView/pythonLauncher/mapping/proxy.txt",
    "sessionURL" : "wss://MYDOMAIN:443/proxy?sessionId=${id}&path=ws",
    "timeout" : 25,
    "log_dir" : "/opt/ParaView/pythonLauncher/viz-logs",
    "upload_dir" : "/opt/ParaView/pythonLauncher/data",
    "fields" : []
  },
  "resources" : [ { "host" : "localhost", "port_range" : [9001, 9003] } ],
  "properties" : {
    "python_exec" : "/opt/ParaView/install/bin/pvpython"
  },

  "apps": {
    "visualizer": {
        "cmd": [
            "${python_exec}", "/opt/ParaView/install/share/visualizer/server/pvw-visualizer.py",
            "--port", "${port}", "--data", "/opt/ParaView/pythonLauncher/data", "-f", "--authKey", "${secret}"
        ],
        "ready_line" : "Starting factory"
    }   
    }   
}  
0x3bfc commented 7 years ago

It works .. thanks a million.... but I didn't find Local rendering tab .... Is there a way to keep the rendering locally?

jourdain commented 7 years ago

Not in the current implementation. We need to do it using vtk-js. But for that we will need some time and funding.

0x3bfc commented 7 years ago

Okay, I hope you do it soon....but I'm wondering do you know what Visualizer version that is compatible with paraview 4+/5+ that enable local rendering .... Thank you very much for your unwavering support. Truly appreciated!

jourdain commented 7 years ago

ParaView 5.2 is the first version of ParaView that require the Web project Visualizer. Before that, Visualizer was part of the ParaView repo. And that version was the one with WebGL.

0x3bfc commented 7 years ago

Aha...Could you please send me the Paraview version "the WebGL based version" that has the option of rendering VTK files locally...Looking forward! Thanks, Ahmed

jourdain commented 7 years ago

You can download any ParaView version from paraview.org or you can use git and checkout any version as well.

If you are on Windows, only ParaView 4 and 5.2 support ParaViewWeb.