unable to connect to a pvserver on a remote machine

I write a server configuration file following the example here: Using SSH Support to secure your client/server communication with ParaView

The part of the configuration file concerning the machine I want to connect to is here:

  <Server name="name" configuration="" resource="cs://remote_machine_hostname:11111">
    <CommandStartup>
      <SSHCommand exec="/cluster/software/ParaView/5.9.1-foss-2021a-mpi/bin/pvserver" timeout="0" delay="5">
        <SSHConfig user="my_user_name">
          <Terminal exec="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"/>
        </SSHConfig>
        <Arguments>
          <Argument value="$PV_SERVER_PORT$"/>
        </Arguments>
      </SSHCommand>
    </CommandStartup>   
  </Server>

Using the Windows powershell, I am able to connect to the remote server with the command ssh my_user_name@remote_machine_hostname

However, when I try to connect to the server from within paraview, I get the following error:

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\System\vtkSocket.cxx, line 447
vtkClientSocket (000002D02FE78820): Socket error in call to connect. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
.

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\System\vtkClientSocket.cxx, line 51
vtkClientSocket (000002D02FE78820): Failed to connect to server remote_machine_hostname:11111

Warning: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\Remoting\Core\vtkTCPNetworkAccessManager.cxx, line 396
vtkTCPNetworkAccessManager (000002D0299C58B0): Connect failed. Retrying for 38.95 more seconds.

Could you help me understand what I am doing wrong?

Thanks in advance for your help.

Hi @torstein ,

Are you able to connect to your server by running it manually on your remote ?

If so, please share the commands you are using.

Hi @mwestphal ,

No, I am not able to connect to the server by running it manually on the remote machine.
Here follows a description of the attempt I have made:

  1. I logged in to the remote machine, and started the pvserver. The remote machine is a supercomputing cluster, and the pvserver there was configured by the administrators of the machine
  2. The output after starting the pvserver was the following:
Waiting for client...
Connection URL: cs://<host_name>:11111
Accepting connection(s): <host_name>:11111

(I have replaced the real host name with <host_name>)

  1. I then configure the server connection as explained here:
    7. Remote and parallel visualization — ParaView Documentation 5.11.0 documentation

I set the startup type to “Manual”

The error messages I then get are the following:

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\System\vtkSocket.cxx, line 447

vtkClientSocket (000001D46F11EA10): Socket error in call to connect. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

.

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\System\vtkClientSocket.cxx, line 51

vtkClientSocket (000001D46F11EA10): Failed to connect to server <host_name>:11111

Warning: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\Remoting\Core\vtkTCPNetworkAccessManager.cxx, line 396

vtkTCPNetworkAccessManager (000001CF32AFB610): Connect failed. Retrying for 38.952 more seconds.

Does this information make sense to you, or do you need more information to help me?

Thanks in advance for your help.

This is the critical part, which ssh commands are you using ?

Hi @mwestphal,

I usually access the cluster with putty, but I can also access it through the command prompt in Windows 11. When using the command prompt, I access the cluster with the following command:
ssh <user_name>@<host_name>

(I have substituted the real user and host name with <user_name> and <host_name> respectively)

In the “Edit Server Configuration” window in Paraview, I have used “Client / Server” as Server Type and 11111 as port.

I hope this was the answer to your question, if I have misunderstood, please clarify.

You need to create SSH tunnel, either manually (I’d suggest starting with that) or with a server configuration.

https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html#case-sixteen-secured-connection-to-a-server-trough-ssh-tunnel

Dear @mwestphal,

I think I am one step closer to connect to the pvserver.
Following the example of case sixteen, I write the following server configuration:

  <Server name="name" configuration="" resource="cs://host_name:11111">
    <CommandStartup>
      <SSHCommand exec="module purge; module load ParaView/5.9.1-foss-2021a-mpi /cluster/software/ParaView/5.9.1-foss-2021b-mpi/bin/pvserver" timeout="-1" delay="5">
        <SSHConfig user="user_name">
          <Terminal/>
          <PortForwarding local="8080"/>
        </SSHConfig>
        <Arguments>
          <Argument value="--server-port=$PV_SERVER_PORT$"/>
        </Arguments>
      </SSHCommand>
    </CommandStartup>
  </Server>

I then click on File > connect, and I chose the server corresponding to the above-mentioned configuration. After clicking “connect”, a terminal window appears asking me the password for the remote machine. I write the password, and I get the message “access granted. Press return to begin session”. I press return, and the paraView window goes into “Not Responding” mode. After that, “nothing” happens.

Do you have any suggestions of what I can do to find out what I am doing wrong?

Thanks in advance for your help.

Sorry, I see that a semicolon is missing in the SSHCommand after loading the module.
I have now included it.
In the terminal window, it now says:

Waiting for client...
Connection URL: cs://host_name:11111
Accepting connection(s): host_name:11111

but still the ParaView window is in “not responding” mode

Yes, try to do the connection manually, using ssh tuneling command.

First an update: I managed to connect to the server using CommandStartup. I am not really sure what I did differently from previous attempts.

Concerning doing the connection manually, I am confused. My understanding is that the tags Terminal, PortForwarding, and Arguments are “sub-tags” of the SSHCommand tag. However, the SSHCommand tag does not make sense if the server is to be started manually. Therefore, I don’t know how to modify the server configuration to make it work for a manual startup of the server.

Do you have an example of how a manual connection using ssh tunneling is done?

Although I managed to connect with a command startup, I think it could be useful to also understand how a manual connection is done.

We need a section in the doc for that.

in a terminal:

ssh -L 8080:localhost:11111 user@remote
cd /path/to/pvserver/
./pvserver
  • run ParaView
  • Create a new server, host: localhost, port: 8888, manual startup
  • Connect to server