pvserver that keeps running after crashing?

Hello,
at work, i have a pc and there is a workstation. i wanted to connect to my workstation from paraview in my pc. for this i am running (in the workstation) pvserver --force-offscreen-rendering from the ouput of it i configured a server in my paraview (in my pc) and then i use the connect button to use paraview remotly. this work great and i am quite happy with it, but i am having a small issue, if when using paraview it crashes or it closes, the pvserver (on the workstation) gets closed and i need to go back to the workstation to re run pvserver --force-offscreen-rendering is there any way to keep it running? so even if a close or if it crashes i can ‘reconnect’ to the workstation directly from my pc?
i tried to add to the configuration of the server the line:
/home/calcul2/franco/Programs/ParaView/ParaView-6.0.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvserver --force-offscreen-rendering but i am getting a critical error ( critical error command launch timed out)
thanks in advance!

This is by design, the server closes when ParaView closes.

Instead, configure the server to run automatically on connection using a .pvsc file.

hello mathieu,

configure the server to run automatically on connection using a .pvsc file.

is there an example of this?
thanks

1 Like

If i am not wrong,
it would be this:

no?
so I navigated to $HOME/.config/ParaView/servers.pvsc and modified to (for info currently the host is something like XXX.XX.XXX.XX (X numbers) port 11111):

<Servers>
  <Server name="workstation" configuration="" resource="cs://XXX.XX.XXX.XX:11111" timeout="60">
    <CommandStartup>
      <Command process_wait="0" delay="5" ""exec="/home/calcul2/franco/Programs/ParaView/ParaView-6.0.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvserver"/>
    </CommandStartup>
  </Server>
</Servers>

(and the /home/calcul2/franco/Programs/ParaView/ParaView-6.0.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvserver is the correct one)
but it times out (the 60 sec timeout)

Does the pvserver run correctly on your server ? Do you see it appears in the process list ?

Hello mathieu,
sorry for the late answer.
the server.pvsc looks like this:

<Servers>
  <Server name="My Server" configuration="" resource="cs://XXX.XX.XXX.XX:11111" timeout="60">
    <CommandStartup>
      <Command process_wait="0" delay="5" exec="/home/calcul2/franco/Programs/ParaView/ParaView-6.0.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvserver">
        <Arguments/>
      </Command>
    </CommandStartup>
  </Server>
</Servers>

in paraview i am getting the error:

critical: In unknown, line 0
critical: Command launch timed out.
critical: In unknown, line 0
critical: Command launch timed out.

and the only thing i have in connect/My server/Edit server/configure is the following line:
/home/calcul2/franco/Programs/ParaView/ParaView-6.0.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvserver
this is the correct path (if i run from ssh, it runs correctly pvserver.

If you need ssh to connect to your server, then this pvsc file cannot be correct.

You probably need something like: 8. Remote and parallel visualization — ParaView Documentation 5.12.0 documentation

1 Like

thanks mathieu,
this is strange as i do not require ssh when doing manyally the pvserver on the side.
I tested with my information,
but I ma getting:

critical: In unknown, line 0
critical: ssh: Could not resolve hostname amber5: Temporary failure in name resolution

critical: In unknown, line 0
critical: Command aborted.

when i tried to connect it showed this: https://docs.paraview.org/en/latest/_images/Server_connection_pvsc_case09.png
where i changed “user” by the user that i use to log to noramlly on the workstation. not sure if i need to change the ‘amber5’ and if i need to, dont know for what.

Didnt you said that you have to ssh into the server to run pvserver ?

sorry if I am not clear.
right now:
i connect to my workstation using turbovnc and from there i open a terminal and run pvserver. or connect via ssh in vscode and there open a terminal and run pvserver. (if thats what you mean)
then, i open paraview, i hit ‘connect’ and i configure a server where: host is equal to the numbers in the VNC server (in turbovnc) and the port that is 11111 (that it was printed when i run pvserver)
then paraview connects to it correctly and i can work in remote.

So ParaView and the pvserverr run on the same computer, is that correct ?

no, pvserver I run it in my workstation (for this I use or vscode or turboVNC connected by ssh), and paraview in my pc.

Then you server that you connect to has an IP right ? Use that instead of amber5 in the ssh config.

I imagine that the IP is the suite of 3 and 2 numbers (something like this: XXX.XX.XXX.XX).
I changed and got this error now (i changed the numbers to XXX.XX.XXX.XX):

ERROR: In vtkSocket.cxx, line 481
vtkClientSocket (0x27103330): Socket error in call to connect. Connection refused.

ERROR: In vtkClientSocket.cxx, line 40
vtkClientSocket (0x27103330): Failed to connect to server XXX.XX.XXX.XX:11111

Warning: In vtkTCPNetworkAccessManager.cxx, line 395
vtkTCPNetworkAccessManager (0x1d6dc080): Connect failed. Retrying for 59.9724 more seconds.

ERROR: In vtkSocket.cxx, line 481
vtkClientSocket (0x27103330): Socket error in call to connect. Connection refused.

ERROR: In vtkClientSocket.cxx, line 40
vtkClientSocket (0x27103330): Failed to connect to server XXX.XX.XXX.XX:11111

Warning: In vtkTCPNetworkAccessManager.cxx, line 395
vtkTCPNetworkAccessManager (0x1d6dc080): Connect failed. Retrying for 58.9549 more seconds.

ERROR: In vtkSocket.cxx, line 481
vtkClientSocket (0x27103330): Socket error in call to connect. Connection refused.

ERROR: In vtkClientSocket.cxx, line 40
vtkClientSocket (0x27103330): Failed to connect to server XXX.XX.XXX.XX:11111

Warning: In vtkTCPNetworkAccessManager.cxx, line 395
vtkTCPNetworkAccessManager (0x1d6dc080): Connect failed. Retrying for 57.9489 more seconds.

ERROR: In vtkSocket.cxx, line 481
vtkClientSocket (0x27103330): Socket error in call to connect. Connection refused.

ERROR: In vtkClientSocket.cxx, line 40
vtkClientSocket (0x27103330): Failed to connect to server XXX.XX.XXX.XX:11111

Warning: In vtkTCPNetworkAccessManager.cxx, line 395
vtkTCPNetworkAccessManager (0x1d6dc080): Connect failed. Retrying for 56.9414 more seconds.

ERROR: In vtkSocket.cxx, line 481
vtkClientSocket (0x27103330): Socket error in call to connect. Connection refused.

ERROR: In vtkClientSocket.cxx, line 40
vtkClientSocket (0x27103330): Failed to connect to server XXX.XX.XXX.XX:11111

Warning: In vtkTCPNetworkAccessManager.cxx, line 395
vtkTCPNetworkAccessManager (0x1d6dc080): Connect failed. Retrying for 55.937 more seconds.

ERROR: In vtkSocket.cxx, line 481
vtkClientSocket (0x27103330): Socket error in call to connect. Connection refused.

ERROR: In vtkClientSocket.cxx, line 40
vtkClientSocket (0x27103330): Failed to connect to server XXX.XX.XXX.XX:11111

Warning: In vtkTCPNetworkAccessManager.cxx, line 395
vtkTCPNetworkAccessManager (0x1d6dc080): Connect failed. Retrying for 54.9268 more seconds.

ERROR: In vtkTCPNetworkAccessManager.cxx, line 377
vtkTCPNetworkAccessManager (0x1d6dc080): Connect aborted.

You may want to try to run your pvserver using a single terminal ssh command, then the configuration of the .pvsc file should be more clear.

You may want to try to run your pvserver using a single terminal ssh command

sorry what do you mean? i added the ssh command as you mentionned here in the .pvsc file. I tried to connect to the server only one time, this was the ouput i got (until i cancel the trying to the connection to the server)

What I mean is that to be able to set up the .pvsc file correctly, you need to understand how to connect to the server and run pvserver using a ssh command.

I cannot help much more.

Okey after some chptish back and foward i solved my issue.

first thing, paraview documentation are for a person that does not has the need enter a password for for connecting by ssh to the server, it mentions that if it is that the case the terminal where paraview is runned will ask for the password (at least in my case it did not prompt or did not see it, so in hopes it helps i add the complete solution).

before the instructions:

  • ip of the server will be noted as XXX.XX.XXX.XX
  • user that one uses to connect to the server userNAME
  • password that one uses to connect to the server userPASSWORD
  • the full path on the server for pvserver pvserverPATH

so here are the steps i followed:

  1. generated a ssh-keygen (i did not had one)
    ssh-keygen -t rsa
    hit enter 3 times (to select default path and set up no password)
  2. try to connect to the server by ssh so the password is saved to the ssh-keygen
    ssh-copy-id userNAME@XXX.XX.XXX.XX
    hit enter, and it will ask for the password type userPASSWORD and hit enter again.
  3. go to .config/ParaView/servers.pvsv and modify (if you dont have any server already configured one can copy paste everything, else one should add the section inside the
<Servers>
  <Server name="RemoteSSHServer" resource="cs://localhost:11111">
    <CommandStartup>
      <Options>
        <Option name="SSH_USER" label="SSH Username" save="true">
          <String default="userNAME" />
        </Option>
        <Option name="SSH_EXE" label="SSH Executable" save="true">
          <File default="/usr/bin/ssh" />
        </Option>
      </Options>
      <Command exec="$SSH_EXE$" delay="5">
        <Arguments>
          <Argument value="-L11111:localhost:11111" />
          <Argument value="$SSH_USER$@XXX.XX.XXX.XX" />
          <Argument value="pvserverPATH" />
        </Arguments>
      </Command>
    </CommandStartup>
  </Server>
</Servers>

as final note not sure if this changes or not but the ‘11111’ it is printed when i do pvserver on the server.
regards.

If a password is needed, it will be asked on the terminal used to run ParaView, which may not be visible in certain cases.