# reverse connection with port forwarding using the master branch

**URL:** https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736
**Category:** ParaView Support
**Created:** [October 16, 2018, 7:18am UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736 "2018-10-16T07:18:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [October 16, 2018, 7:18am UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/1 "2018-10-16T07:18:13Z")

</div>

Reverse connection with port forwarding is my standard, well tested procedure to connect to my server. PV5.6-RC2 works just fine, between client and server.

I now have problems using reverse connection with the master branch of ParaView.  
Using the exact same procedure, I can no longer connect with the master branch, compiled both on my client and server sides. I suspect the commit ec68385af is what is causing me problems. I have reverted to a commit just prior to that (specifically git checkout ad657b8ef) and my connection works fine. Question:

I see a note about the variable `PV_SSH_PF_SERVER_PORT` should be set. But I don’t understand if it should be set to any value, or to the value of the port itself. Should it be set client-side, or server-side?

Does a working servers.pvsc file have to be modified to be compliant to the new method? in that case, how do I keep my original servers.pvsc file which works great for 5.6-RC2, and also enable connection with the development version?

btw, the error message I get is “connect\_to localhost port 1100: failed.”, and on the server side, I get

Connection failed during handshake. vtkSocketCommunicator::GetVersion()  
returns different values on the two connecting processes  
(Current value: 100).

Any tip would be appreciated.  
TIA  
J

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [October 16, 2018, 1:19pm UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/2 "2018-10-16T13:19:55Z")

</div>

Pinging @mwestphal.

---

<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: [October 16, 2018, 2:38pm UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/3 "2018-10-16T14:38:55Z")

</div>

Hi Jean,

I was the one working on the breaking commit.

> Using the exact same procedure, I can no longer connect with the master branch, compiled both on my client and server sides. I suspect the commit ec68385af is what is causing me problems. I have reverted to a commit just prior to that (specifically git checkout ad657b8ef) and my connection works fine.

This change is supposed to be fully retro compatible, please share a non working server configuration so I can investigate.

> I see a note about the variable PV\_SSH\_PF\_SERVER\_PORT should be set. But I don’t understand if it should be set to any value, or to the value of the port itself. Should it be set client-side, or server-side?

`PV_SSH_PF_SERVER_PORT` is a variable you can use in your server script, you do not need to set it, just recover it in your server script. This is the port on which the server will try to connect to the client through the ssh tunnel.

> Connection failed during handshake. vtkSocketCommunicator::GetVersion()  
> returns different values on the two connecting processes  
> (Current value: 100).

Do you see this error ?

> vtkSocketCommunicator (0x5555557e5280): Client/server version hash mismatch.

In any case, you will find lots of info there:  
[https://gitlab.kitware.com/paraview/paraview/merge\_requests/2652](https://gitlab.kitware.com/paraview/paraview/merge_requests/2652)

> [@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):
>
> Since [mr](https://gitlab.kitware.com/paraview/paraview/merge_requests/2652) and [mr](https://gitlab.kitware.com/paraview/paraview/merge_requests/2821), ParaView master now has a support for ssh, which includes port forwarding. In order to use it, you will need first to install a terminal and an ssh tool. Terminals are available by default on Windows, Mac and virtually on all linux distribution. Ssh is available by default on mac, on all package manager on all linux distribution. On windows ssh is now available by default with the Windows 10 Spring update but we recommend installing [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/) as support for rc connection is bett…

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [October 16, 2018, 5:31pm UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/4 "2018-10-16T17:31:35Z")

</div>

Just confirming that with Mathieu’s change and unmodified .pvsc or server side connection scripts I can still do reverse connections through tunnels.

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [October 17, 2018, 6:46pm UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/5 "2018-10-17T18:46:25Z")

</div>

I have more info, which I have already shared privately with Mathieu.

I was able to connect, by specifically asking port number 11111. What makes my previous test fail is that I am requesting a port number different than the default value of 11111. This problem comes from the “Connect” menu of the GUI.

If instead I strictly use the Python shell to issue a ReverseConnect(“1234”) call, and launch my ssh command to the remote site manually, then I can indeed reverse-connect to port 1234.

I feel like the problem is that a non-default port number value request (!= 11111) is ignored and the client only tries to AcceptConnection on hostname:11111

---

<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: [October 18, 2018, 8:23am UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/6 "2018-10-18T08:23:22Z")

</div>

Thanks @jfavre for your debug. I’ve identified the problem and should be able to fit it shortly.

---

<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: [October 18, 2018, 1:49pm UTC](https://discourse.paraview.org/t/reverse-connection-with-port-forwarding-using-the-master-branch/736/7 "2018-10-18T13:49:12Z")

</div>

This should now be fixed in [master](https://gitlab.kitware.com/paraview/paraview/merge_requests/2853)
