# Error when connecting with pvserver

**URL:** https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181
**Category:** ParaView Support
**Created:** [August 23, 2022, 1:52pm UTC](https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181 "2022-08-23T13:52:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![CFDaniel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a88e57/32.png) [@CFDaniel](https://discourse.paraview.org/u/CFDaniel)
#### Post date: [August 23, 2022, 1:52pm UTC](https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181/1 "2022-08-23T13:52:52Z")

</div>

Hello everyone,

because I am working with large models a colleague recommended me to work with a paraview server where I can use multiple cores. I found an instruction online how to setup up paraview for working remotely which is the following:

Make sure you install the same version on the client and on the server. Then you can run on your server:

```auto
<paraview_install>/bin/mpiexec -np 4 <paraview_install>/bin/pvserver

```

Than you can use your client to connect to this server.

```auto
<paraview_install>bin/paraview --url=

```

I have to say that my server and client is the same machine. The first time I followed the instruction everything worked fine. But when I closed paraview and opened it again I got following error and it is not possible to connect to the server and work with paraview on multiple cores anymore.

```auto
Waiting for client...
Connection URL: xxx
Accepting connection(s): xxx
Waiting for client...
Connection URL: xxx
Exiting...
( 0.064s) [pvserver] vtkSocket.cxx:187 ERR| vtkServerSocket (0x56270f1acbd0): Socket error in call to bind. Address already in use.
( 0.064s) [pvserver]vtkTCPNetworkAccessMana:440 ERR| vtkTCPNetworkAccessManager (0x56270f0e8c90): Failed to set up server socket.
Waiting for client...
Connection URL: xxx
( 0.065s) [pvserver] vtkSocket.cxx:187 ERR| vtkServerSocket (0x55cf1c3dac00): Socket error in call to bind. Address already in use.
( 0.065s) [pvserver]vtkTCPNetworkAccessMana:440 ERR| vtkTCPNetworkAccessManager (0x55cf1c316c90): Failed to set up server socket.
Waiting for client...
Connection URL: xxx
Exiting...
( 0.065s) [pvserver] vtkSocket.cxx:187 ERR| vtkServerSocket (0x55d56baafc00): Socket error in call to bind. Address already in use.
( 0.065s) [pvserver]vtkTCPNetworkAccessMana:440 ERR| vtkTCPNetworkAccessManager (0x55d56b9ebc90): Failed to set up server socket.
Exiting...

```

Do I need to close my first connection? If so, how is that possible? Could somebody please help me? I appreciate any kind of help. If you need additional information, feel free to ask.

Many thanks and best regards,  
Daniel

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [August 24, 2022, 4:37pm UTC](https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181/2 "2022-08-24T16:37:48Z")

</div>

Hi Daniel,

Are you using paraview binaries from [paraview.org](http://paraview.org) or did you build it yourself?

It looks like your build of paraview does not have MPI support. What I mean here is that the PARAVIEW\_USE\_MPI flag was likely off during cmake configuration. It is by default off.

Please try reconfiguring it with `cmake -DPARAVIEW_USE_MPI=ON <other flags>`

Edit: If it worked the first time, then it has nothing to do with what I said above. You have to quit the pvserver process for it to work again because the server tries to use the same port again. Normally, if you close the paraview application window, the pvserver exits. It appears as though the pvserver did not exit for some reason.

---

<div class="post-metadata">

### Author: ![CFDaniel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a88e57/32.png) [@CFDaniel](https://discourse.paraview.org/u/CFDaniel)
#### Post date: [August 25, 2022, 4:47am UTC](https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181/3 "2022-08-25T04:47:29Z")

</div>

Hi Jaswant,

exactly. The first time it did work for me … But for some reason it did not close the pvserver. Is it possible to quit the server manually or to connect to another port?

Thanks for your help.  
Daniel

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [August 25, 2022, 1:46pm UTC](https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181/4 "2022-08-25T13:46:34Z")

</div>

Did you try killing the pvserver process with `kill`? Usually, Ctrl-C should interrupt and quit pvserver.

> or to connect to another port?

Launch pvserver with the -p argument and specify port number

```auto
-p,--sp,--server-port INT=11111
                                Port number to use to listen for connections from the client.

```

---

<div class="post-metadata">

### Author: ![CFDaniel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a88e57/32.png) [@CFDaniel](https://discourse.paraview.org/u/CFDaniel)
#### Post date: [August 30, 2022, 10:06am UTC](https://discourse.paraview.org/t/error-when-connecting-with-pvserver/10181/5 "2022-08-30T10:06:44Z")

</div>

Hi Jaswant, thank you for your help. I was able to kill the pvserver. Now it is working fine again.

Best regards,  
Daniel
