enabling wss for paraview visualiser

Hi,
I’m accessing paraview visualizer via ngrok using https.

I have to allow mixed content in Chrome bc visualizer uses apparently ws:/ and not wss:/
Is there a way to enable wss for visualizer?
Or what’s your recommendation to run visualizer via ngrok?

I’m running paraview version 5.11.2 on Rocky linux:
pvpython -m paraview.apps.visualizer --mesa --port 11111 --data /tmp/pvvisualizer/ --host 0.0.0.0 --timeout 0 --debug

Thanks,
Robert

You have some --ssl args available so you can provide a certificate for your hostname. Just use --help to list those parameters.

Although, since you are running with ParaView, SSL is not available within pvpython due to security reason. So you will need to use a reverse proxy where you run your visualizer to serve its content over https/wss. Something like Apache, NGINX, traefik…

Hi Sebastien,
Thank you for the quick reply!
Very much appreciated.

Yea, I tried to reverse proxy it with nginx, apache, and a custom one without success.

One issue is that visualizer doesn’t seem to accept POST requests that show up when running https and I don’t understand enough of the underlying technology. I just wanna use paraview over the web in a secure way :slight_smile:
I have tried to rewrite it to GET without success.

The main issue is that it’s an https connection from the browser through the ngrok tunnel but then visualizer establishes a non secure web socket somehow which is not allowed.

The easiest would be that visualizer uses wss I think.

Thanks for any guidance.

ParaView Web and trame application usually only serve static content and everything else go through websocket. (The post request can be ignored as it is for session launching when a launcher is available)

Since Visualizer is old, the auto detection of protocol has a bug that was fixed maybe a year or so ago for trame. Because of that bug, you will need to manually provide the ws path in the url.

So for example if you were reaching the application with the following url https://my.domain.com/visualizer/ you should add a query to specify the ws connection.

https://my.domain.com/visualizer/?sessionURL=wss://my.domain.com/visualizer/ws

HTH,

Seb

OMG, it helped to make my thing going :slight_smile:
Thank you so much for your quick help!

1 Like

Glad it worked…

This is the bug I was talking about (Fixed on June 2022).

If you patch the JS file in visualizer, you should be able to skip the query param.

Oh I see. I understand now.
I installed paraview with dnf. Seems the bug fix didn’t make it to the repo.

What’s the release policy there?
Do you have suggestions how to update the dnf installation?
Or in general how to install paraview and visualizer on (Rocky) Linux?

Visualizer hasn’t been updated in 6 years and has been removed in 5.13.

So what’s the suggested alternative that provides the same functionality and similar maturity?

You can keep using it if that correspond to your needs (and even modify/patch it). If not, building an application with trame give you a lot more flexibility, but that is just a framework not an app.