paraview web Visualizer on linux server

I am trying to run paraview web visualizer on a linux VM from Azure Cloud but it does not work,

  • I connected to the VM through ssh

  • installed paraview using sudo apt install paraview

  • started paraview server as well by running ./usr/bin/pvserver and it works

  • Installed npm v 18 and installed visualizer npm install -g pvw-visualizer

  • When I run Visualizer -p 8080 --data /path/to/data/output/ --paraview /usr/bin/ --server-only , it starts the client then it crashes with segmentation fault.

`Loguru caught a signal: SIGSEGV
Stack trace:
60      0x59b6c6135705 /usr/bin/pvpython(+0x2705) [0x59b6c6135705]
59      0x7279a4429e40 __libc_start_main + 128
58      0x7279a4429d90 /usr/bin/../lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7279a4429d90]
57      0x59b6c6135fc7 /usr/bin/pvpython(+0x2fc7) [0x59b6c6135fc7]
56      0x59b6c6135e38 /usr/bin/pvpython(+0x2e38) [0x59b6c6135e38]
55      0x7279a47099fb vtkPythonInterpreter::PyMain(int, char**) + 895
54      0x7279a1828fdc Py_RunMain + 1276
53      0x7279a180d28f _PyRun_AnyFileObject + 63
52      0x7279a180cd76 _PyRun_SimpleFileObject + 390
51      0x7279a180c4cd /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x20c4cd) [0x7279a180c4cd]
50      0x7279a17bd3de PyEval_EvalCode + 190
49      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
48      0x7279a1678468 _PyEval_EvalFrameDefault + 26632
47      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
46      0x7279a167c28a _PyEval_EvalFrameDefault + 42538
45      0x7279a16dfadc _PyObject_MakeTpCall + 140
44      0x7279a174388e /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x14388e) [0x7279a174388e]
43      0x7279a174f0fe /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x14f0fe) [0x7279a174f0fe]
42      0x7279a16e1e10 _PyObject_Call_Prepend + 224
41      0x7279a16e1bf7 _PyObject_FastCallDictTstate + 87
40      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
39      0x7279a167b9c8 _PyEval_EvalFrameDefault + 40296
38      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
37      0x7279a167b9c8 _PyEval_EvalFrameDefault + 40296
36      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
35      0x7279a1679efe _PyEval_EvalFrameDefault + 33438
34      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
33      0x7279a167acf0 _PyEval_EvalFrameDefault + 37008
32      0x7279a16dfadc _PyObject_MakeTpCall + 140
31      0x7279a174388e /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x14388e) [0x7279a174388e]
30      0x7279a174f0fe /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x14f0fe) [0x7279a174f0fe]
29      0x7279a16e1e10 _PyObject_Call_Prepend + 224
28      0x7279a16e1c76 _PyObject_FastCallDictTstate + 214
27      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
26      0x7279a167b9c8 _PyEval_EvalFrameDefault + 40296
25      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
24      0x7279a167b9c8 _PyEval_EvalFrameDefault + 40296
23      0x7279a16e23d8 /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0xe23d8) [0x7279a16e23d8]
22      0x7279a17c23af /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c23af) [0x7279a17c23af]
21      0x7279a1676776 _PyEval_EvalFrameDefault + 19222
20      0x7279a16e1fec _PyObject_Call + 92
19      0x7279a1728008 /usr/bin/../lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x128008) [0x7279a1728008]
18      0x727975e32204 /usr/lib/python3/dist-packages/paraview/modules/vtkRemotingViews.so(+0x232204) [0x727975e32204]
17      0x72799e9f2011 vtkSMViewProxy::StillRender() + 815
16      0x7279a284369c vtkSMProxy::ExecuteStream(vtkClientServerStream const&, bool, unsigned int) + 174
15      0x7279a26df672 vtkPVSessionBase::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 100
14      0x7279a26e3632 vtkPVSessionCore::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 520
13      0x7279a26e388e vtkPVSessionCore::ExecuteStreamInternal(vtkClientServerStream const&, bool) + 254
12      0x7279a46ae381 vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) + 51
11      0x7279a46ae522 vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&, int) + 368
10      0x7279a46af06f vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream const&, int) + 517
9       0x7279a46b0cfa vtkClientServerInterpreter::CallCommandFunction(char const*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&) + 882
8       0x7279a2fa4747 vtkPVRenderViewCommand(vtkClientServerInterpreter*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&, void*) + 4798
7       0x72799e8cfdcb vtkPVRenderView::StillRender() + 265
6       0x72799e8d1239 vtkPVRenderView::Render(bool, bool) + 4777
5       0x72799a901dec vtkXOpenGLRenderWindow::Render() + 162
4       0x72799a7f2fad vtkOpenGLRenderWindow::Render() + 133
3       0x727999026aa1 vtkRenderWindow::Render() + 813
2       0x72799b349e38 vtkXRenderWindowInteractor::Initialize() + 1794
1       0x72799730674d XSync + 29
0       0x7279a4442520 /usr/bin/../lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7279a4442520]
(   1.147s) [paraview        ]                       :0     FATL| Signal: SIGSEGV
Segmentation fault (core dumped)
`

I think this happens because it tries to open the graphical window similar but it fails since it is on a server without GUI, even when I pass --server-only.

I followed the same steps above on my local machine and it works. Is there a way to make running on Azure VM and access it from the browse on my local machine?

Thanks in advance

Visualizer is already bundled in ParaView when you download it here. For headless machine, you need to grab either the EGL (GPU) or OSMesa (CPU) version. Then you can run it like pvpython -m paraview.apps.visualizer --data ...