# vtkSocketCommunicator errors: "Could not receive tag" and "Endian handshake failed"

**URL:** https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350
**Category:** ParaView Support
**Tags:** vtk
**Created:** [January 16, 2020, 1:31pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350 "2020-01-16T13:31:06Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![XavierStuvw](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xavierstuvw/32/2619_2.png) [@XavierStuvw](https://discourse.paraview.org/u/XavierStuvw)
#### Post date: [January 16, 2020, 1:31pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/1 "2020-01-16T13:31:06Z")

</div>

### Issue and situation

This post is a second branch of [Reverse client-server connection fails with more than one MPI process](https://discourse.paraview.org/t/reverse-client-server-connection-fails-with-more-than-one-mpi-process/3207). Parallel jobs fall back to serial in a reverse connection between client and server within the same network – see above post for the mechanics of the error.

- At server and client side I work with same architectures, operating systems and compilers: x86\_64, Debian GNU/Linux 10 (buster), gcc (Debian 8.3.0-6) 8.3.0.
- Paraview is a release build of 5.7.0 out of the Superbuild at [https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/README.md](https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/README.md). The repository has been cloned separately on client and server.

### Search

Earlier I was trying to pinpoint the cause of the error linked to the disconnection with a mpi process: ["vtkSocketCommunicator::GetVersion() returns different values on the two connecting processes"](https://discourse.paraview.org/t/vtksocketcommunicator-getversion-returns-different-values-on-the-two-connecting-processes/3347). @mwestphal has pointed out that this very message is not informative and is a known issue in itself, see [https://gitlab.kitware.com/paraview/paraview/issues/18171](https://gitlab.kitware.com/paraview/paraview/issues/18171). Therefore it makes sense to inquire into the error messages received just before that one.

> [31m( 26.150s) [pvserver]vtkSocketCommunicator.c:808 ERR| vtkSocketCommunicator (0x56537cb0bff0): **Could not receive tag**. 1010580540  
> [31m( 26.150s) [pvserver]vtkSocketCommunicator.c:557 ERR| vtkSocketCommunicator (0x56537cb0bff0): **Endian handshake failed**.

I found documentation of either error or of both in

- 2016, issue tracker of VTK: [https://vtk.org/Bug/view.php?id=16094](https://vtk.org/Bug/view.php?id=16094)
- 2013 [[General] Volume rendering only with one core -- CFD Online Discussion Forums](https://www.cfd-online.com/Forums/paraview/124418-volume-rendering-only-one-core.html)
- 2013 [http://vtk.1045678.n5.nabble.com/Using-paraview-with-pvserver-td5719016.html](http://vtk.1045678.n5.nabble.com/Using-paraview-with-pvserver-td5719016.html)
- 2013, paraview narchive: [[Paraview] Connecting to pvserver](https://paraview.paraview.narkive.com/ogEJvINP/connecting-to-pvserver)
- 2009, [https://www.paraview.org/pipermail/paraview/2009-February/011237.html](https://www.paraview.org/pipermail/paraview/2009-February/011237.html)

which all kind of relate to the same attempts to have pvserver work as expected. But they do not seem to have received an adequate answer, or I could not decipher a relationship to my specifics.

Previous activity on this forum lets me think that

- the error “Could not receive tag” happen also after connection, see [Search results for '"could not receive tag"' - ParaView](https://discourse.paraview.org/search?q=%22could%20not%20receive%20tag%22). Whereas in my case this exception occurs at connect time (parallel launch degrades to serial).
- there’s been no discussion on endian handshakes [Search results for '"endian handshake"' - ParaView](https://discourse.paraview.org/search?q=%22endian%20handshake%22) either.

Same tune on Stackexchange [https://stackexchange.com/search?q="Could+not+find+tag"](https://stackexchange.com/search?q=%22Could+not+find+tag%22), if not no tune at all: [https://stackexchange.com/search?q="Endian+handshake+failed"](https://stackexchange.com/search?q=%22Endian+handshake+failed%22)

### Questions

Any suggestion for fixes and workarounds to have the reverse connection work in parallel?

---

<div class="post-metadata">

### Author: ![XavierStuvw](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xavierstuvw/32/2619_2.png) [@XavierStuvw](https://discourse.paraview.org/u/XavierStuvw)
#### Post date: [February 13, 2020, 3:15pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/2 "2020-02-13T15:15:48Z")

</div>

Resuming this topic whereby pvserver does not work in parallel mode with reverse connection, I hope that the search reporting given above is exhaustive enough.  
Elaborating on it, I have server and client clashing on this line of the subroutine vtkSocketCommunicator (namely from /superbuild/paraview/src/VTK/Parallel/Core/vtkSocketCommunicator.cxx)

> **554 if (!this-\>ReceiveTagged(&serverIsBE, static\_cast\<int(sizeof(char)), 1,  
> 555 vtkSocketController::ENDIAN\_TAG, nullptr))**  
> 556 {  
> 557 vtkSocketCommunicatorErrorMacro(“Endian handshake failed.”);  
> 558 return 0;  
> 559 }

What does the condition 554 imply? Is this a question for the developers? Thanks for advising. Reverse connection is the only way for me to use Paraview purposefully, alas.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [February 13, 2020, 3:34pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/3 "2020-02-13T15:34:55Z")

</div>

First, make sure that the VTK submodule is updated on both the client and server:

`git submodule update --recursive`

I have forgotten to do that and run into similar connection errors.

If that doesn’t work, you can try a `make clean` in your build directory. If that still doesn’t work, delete everything inside the build directory and start fresh.

---

<div class="post-metadata">

### Author: ![XavierStuvw](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xavierstuvw/32/2619_2.png) [@XavierStuvw](https://discourse.paraview.org/u/XavierStuvw)
#### Post date: [February 14, 2020, 9:13am UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/4 "2020-02-14T09:13:32Z")

</div>

That’s the solution! I can see four pvserver processes working remotely for my local viewer, as intended. No crashes

* * *

@cory.quammen Please note that in the superbuild instructions at  
[https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/README.md#building-a-specific-version](https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/README.md#building-a-specific-version) the suggested operation is  
`git submodule update`  
without the `--recursive` option. Out of your experience would you then reckon that the mistake could lay in the lack of the recursive option? Is it the case to align that readme file with your tip?

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [February 14, 2020, 4:56pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/5 "2020-02-14T16:56:59Z")

</div>

The `--recusive` option just tells the VTK submodule to update its (currently one) submodule, VTK-m, which shouldn’t make a difference with regards to the client/server handshake. But that operation should be updated in the build instructions.

---

<div class="post-metadata">

### Author: ![XavierStuvw](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xavierstuvw/32/2619_2.png) [@XavierStuvw](https://discourse.paraview.org/u/XavierStuvw)
#### Post date: [February 15, 2020, 9:29am UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/7 "2020-02-15T09:29:15Z")

</div>

@ben.boeckel?

> [@cory.quammen](#):
>
> The `--recusive` option just tells the VTK submodule to update its (currently one) submodule, VTK-m, which shouldn’t make a difference with regards to the client/server handshake. But that operation should be updated in the build instructions.

Reference is made to [https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/README.md#building-a-specific-version](https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/README.md#building-a-specific-version)

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [February 15, 2020, 2:48pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/8 "2020-02-15T14:48:02Z")

</div>

I’m even more confused now. Those build instructions you’ve cited are for the superbuild, not paraview itself - `--recursive` is only useful when updating the paraview repository. The superbuild does have a submodule that requires updating, but it does not have nested submodules that would require the `--recursive` option to be passed to `git submodule update`. In any case, I am glad it is working for you now. I suspect maybe you had a build in a bad state and rebuilding was the actual solution.

For superbuild, I’m not sure how well `make clean` works in practice. `make clean` is always a little dicey when source code might be changing (via `git submodule update`, etc.) as build rules are added and deleted. It is usually safest to start from an empty build directory if you get into a “weird” state and `make clean` hasn’t worked.

---

<div class="post-metadata">

### Author: ![XavierStuvw](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xavierstuvw/32/2619_2.png) [@XavierStuvw](https://discourse.paraview.org/u/XavierStuvw)
#### Post date: [February 15, 2020, 6:46pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/9 "2020-02-15T18:46:53Z")

</div>

And I am ever more confused now.

The errors have been launched by pvserver, and both client and sever are little endian; I cannot say which potential bad build was sending a wrong endianness or reading it wrong, though. I sort of think to have launched a `make clean` after each rebuild attempt as a matter of habit.

I reported my previous investigations in [Reverse client-server connection fails with more than one MPI process](https://discourse.paraview.org/t/reverse-client-server-connection-fails-with-more-than-one-mpi-process/3207). **At the server side** I could have skipped doing the `git submodule update` when I cloned the repository the first or other times. Or not having cleaned the build dir.

However, after the git-update-submodule’s, I had to work around another issue **at the client side** , namely [building version 5.7.0 on cluster (2)](https://discourse.paraview.org/t/building-version-5-7-0-on-cluster-2/3489/4). There I certain had a `make clean` at each attempt. So the alternative anwer could be don’t forget to make clean before rebuilding? Please add that to your answer above if applicable: there’s not much recent around about this endian-handshake glitch, and it can be useful for future readers.

Indeed, either way that issue is solved. Thanks for sparring.

---

<div class="post-metadata">

### Author: ![XavierStuvw](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xavierstuvw/32/2619_2.png) [@XavierStuvw](https://discourse.paraview.org/u/XavierStuvw)
#### Post date: [February 19, 2020, 8:13am UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/10 "2020-02-19T08:13:01Z")

</div>

@cory.quammen Would you mind it to edit your accepted answer and add that making sure to do a `make clean` could also be part of the solution? There are not so many tips in the internet on sorting the endian-handshake incident. A little edit can help future readers fix their problem quickly, since the solution is appended to the question. Thanks in advance.

This concludes my elaborations on this post. Thanks again for the support.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [February 19, 2020, 1:43pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/11 "2020-02-19T13:43:50Z")

</div>

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: [March 31, 2023, 5:04pm UTC](https://discourse.paraview.org/t/vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake-failed/3350/12 "2023-03-31T17:04:08Z")

</div>

A post was split to a new topic: [ParaView vtkSocketCommunicator errors: “Could not receive tag” and “Endian handshake"](https://discourse.paraview.org/t/paraview-vtksocketcommunicator-errors-could-not-receive-tag-and-endian-handshake/11776)
