# unable to connect to a pvserver on a remote machine

**URL:** https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331
**Category:** ParaView Support
**Created:** [September 15, 2022, 7:43pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331 "2022-09-15T19:43:25Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![torstein](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@torstein](https://discourse.paraview.org/u/torstein)
#### Post date: [September 15, 2022, 7:43pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/1 "2022-09-15T19:43:25Z")

</div>

I write a server configuration file following the example here: [Using SSH Support to secure your client/server communication with ParaView](https://discourse.paraview.org/t/using-ssh-support-to-secure-your-client-server-communication-with-paraview/682)

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

```auto
  <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:

```auto
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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2022, 2:01am UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/2 "2022-09-16T02:01:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![torstein](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@torstein](https://discourse.paraview.org/u/torstein)
#### Post date: [December 5, 2022, 2:41pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/3 "2022-12-05T14:41:53Z")

</div>

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:

```auto
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](https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html)

I set the startup type to “Manual”

The error messages I then get are the following:

```auto
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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 5, 2022, 4:25pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/4 "2022-12-05T16:25:57Z")

</div>

> [@torstein](#):
>
> I then configure the server connection as explained here:

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

---

<div class="post-metadata">

### Author: ![torstein](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@torstein](https://discourse.paraview.org/u/torstein)
#### Post date: [December 5, 2022, 11:10pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/5 "2022-12-05T23:10:17Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 6, 2022, 7:48am UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/6 "2022-12-06T07:48:21Z")

</div>

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](https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html#case-sixteen-secured-connection-to-a-server-trough-ssh-tunnel)

---

<div class="post-metadata">

### Author: ![torstein](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@torstein](https://discourse.paraview.org/u/torstein)
#### Post date: [December 7, 2022, 1:00pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/7 "2022-12-07T13:00:32Z")

</div>

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:

```auto
  <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.

---

<div class="post-metadata">

### Author: ![torstein](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@torstein](https://discourse.paraview.org/u/torstein)
#### Post date: [December 7, 2022, 1:12pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/8 "2022-12-07T13:12:04Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 7, 2022, 2:02pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/9 "2022-12-07T14:02:24Z")

</div>

> [@torstein](#):
>
> Do you have any suggestions of what I can do to find out what I am doing wrong?

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

---

<div class="post-metadata">

### Author: ![torstein](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@torstein](https://discourse.paraview.org/u/torstein)
#### Post date: [December 7, 2022, 2:39pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/10 "2022-12-07T14:39:02Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 7, 2022, 2:50pm UTC](https://discourse.paraview.org/t/unable-to-connect-to-a-pvserver-on-a-remote-machine/10331/11 "2022-12-07T14:50:15Z")

</div>

> [@torstein](#):
>
> Do you have an example of how a manual connection using ssh tunneling is done?

We need a section in the doc for that.

in a terminal:

```auto
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
