Unable to connect to Preview on a remote machine


I am unable to create the connection on Paraview on a remote machine. The error is the following:
Error: in /opt/glr/paraview/paraview-ci/build/superbuild/paraview/src/VTK/Common/System/vtkClientSocket.cxx,line 51vtkClientSocket (0x6000001ebscb00):Failed to connect to server localhost:11111

Here is the description of the steps that I followed:

  1. Connect to the remote machine, allocate a node, verify that the node is running using “squeue”, then ssh to that node.

  2. Setup a tunnel between my computer and that node using:
    ssh -N -L 11111:nodename:11111 email_adresse_of_the_remote_machine

  3. Verify that the tunnel is running:
    local_machine> ps aux | grep ssh

  4. Go back to the remote machine and type:
    /path_to_paraview/paraview/bin/mpiexec -n 20 /path_to_paraview/paraview/bin/pvserver

It returns:
"waiting for client…
Connection URL: cs//node_name:11111
Accepting connection(s): node_name:11111

  1. I open the same version of Paraview than the one that I have installed on the remote machine, which is 5.10.1

File > Connect > Add Server >
Name: add name
Server Type: Client /Server
Host: localhost
Port: 11111
Save > Connect

After 1min, it gave me the following error:
Error: in /opt/glr/paraview/paraview-ci/build/superbuild/paraview/src/VTK/Common/System/vtkClientSocket.cxx,line 51vtkClientSocket (0x6000001ebscb00):Failed to connect to server localhost:11111

I just want to mention that I also tried working with Paraview-5.9.1 both on remote machine and local machine, and I did had the same error.
I also tried different port 11511, 11611, instead of 11111, it does not help!

Another extra information, when I uninstall paraview and reinstall it again, it does keep in memory the connection that I tried before. I am wondering if there is something wrong with my setup!

PS: I also tried different remote machines, and still always the same problem.

Please feel free to share any suggestions that could be helpful!

I do appreciate your help!

Thank you,

Sara Youssoufi