reverse connection with port forwarding using the master branch

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

Pinging @mwestphal.

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

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

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

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

This should now be fixed in master