# Is headless mode not working or am I missing something?

**URL:** https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599
**Category:** ParaView Support
**Created:** [May 11, 2024, 1:37am UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599 "2024-05-11T01:37:31Z")
**Posts on this page:** 7
**Page:** 1

<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: [May 11, 2024, 1:37am UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/1 "2024-05-11T01:37:31Z")

</div>

Hi,

I am having trouble with the recent ParaView Server for Headless Machines (osmesa) binaries such that it is looking for and failing to find GL libs.

$ ./ParaView-5.9.1-osmesa-MPI-Linux-Python3.8-64bit/bin/pvpython  
Python 3.8.8 (default, May 17 2021, 15:56:25)  
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > “” I can read, render and save images fine with 5.9.“”"

$ ./ParaView-5.10.1-osmesa-MPI-Linux-Python3.9-x86\_64/bin/pvpython  
/home/demo/netcdf\_files\_orca025/ParaView-5.10.1-osmesa-MPI-Linux-Python3.9-x86\_64/bin/pvpython-real: error while loading shared libraries: libglapi.so.0: cannot open shared object file: No such file or directory

$ ./ParaView-5.11.2-osmesa-MPI-Linux-Python3.9-x86\_64/bin/pvpython  
/home/demo/netcdf\_files\_orca025/ParaView-5.11.2-osmesa-MPI-Linux-Python3.9-x86\_64/bin/pvpython-real: error while loading shared libraries: libglapi.so.0: cannot open shared object file: No such file or directory

$ ./ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86\_64/bin/pvpython  
/home/demo/netcdf\_files\_orca025/ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86\_64/bin/pvpython-real: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

Combinations of --disable-xdisplay-test, --force-offscreen-rendering, and --mesa --backend swr do not seem to help and I don’t see anything related in the 5.10 release notes.

What am I missing?

thanks!

---

<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: [May 11, 2024, 12:36pm UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/2 "2024-05-11T12:36:22Z")

</div>

Hmm. Does it work better if you pass `--mesa`?

---

<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: [May 11, 2024, 1:17pm UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/3 "2024-05-11T13:17:27Z")

</div>

nope.

$ ./ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86\_64/bin/pvpython --mesa  
/home/demo/netcdf\_files\_orca025/ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86\_64/bin/pvpython-real: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

---

<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: [May 13, 2024, 2:07pm UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/4 "2024-05-13T14:07:54Z")

</div>

Note, a build of ParaView 5.12 from paraview-superbuild with osmesa turned on works fine on the machine. The problem is just that the published binary does not.

---

<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: [May 14, 2024, 1:25pm UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/5 "2024-05-14T13:25:25Z")

</div>

I confirm that the ParaView 5.12.0 osmesa NEEDS `libglapi.so.0` and other OpenGL related libraries:

```auto
 ldd ./bin/pvpython-real
   [...]
   libglapi.so.0 => /usr/lib/libglapi.so.0 (0x0000779869e24000)
   [...]
   libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x0000779864fc0000)
   libGLX.so.0 => /usr/lib/libGLX.so.0 (0x0000779864f8e000)
   libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000779864f63000)

```

This is definitely unexpected, my suspicion is that one of our dependency links to it.

According to libtree:

`libglapi` is needed by osmesa (!!!):

```auto
│ │ │ ├── libOSMesa.so.8 [runpath]
│ │ │ │ ├── libz.so.1 [rpath]
│ │ │ │ ├── libglapi.so.0 [default path]
│ │ │ │ └── libpthread.so.0 [default path]

```

And `libGL*` and `libx*` are linked by open cascade:

```auto
│ │ │ │ │ │ ├── libTKService.so.7.7 [rpath]
│ │ │ │ │ │ │ └── libX11.so.6 [default path]
│ │ │ │ │ │ │ └── libxcb.so.1 [default path]
│ │ │ │ │ │ │ ├── libXau.so.6 [default path]
│ │ │ │ │ │ │ └── libXdmcp.so.6 [default path]

```

```auto
│ │ │ │ │ ├── libTKV3d.so.7.7 [rpath]
│ │ │ │ │ │ ├── libGL.so.1 [default path]
│ │ │ │ │ │ │ ├── libGLdispatch.so.0 [default path]
│ │ │ │ │ │ │ └── libGLX.so.0 [default path]
│ │ │ │ │ │ │ ├── libGLdispatch.so.0 [default path]
│ │ │ │ │ │ │ └── libX11.so.6 [default path]
│ │ │ │ │ │ ├── libX11.so.6 [default path]

```

To work around this, one simply needs to install the packages but it would be better to not need them at all.

So `libglapi` links seems to be intentional (?) and the rest should be carved out of the opencascade lib by patching it. @Dave_DeMarle , please open an issue on [https://gitlab.kitware.com/paraview/paraview-superbuild/](https://gitlab.kitware.com/paraview/paraview-superbuild/).

---

<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: [May 14, 2024, 1:39pm UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/6 "2024-05-14T13:39:16Z")

</div>

Thanks, [paraview 5.10,11,12 headless mesa binaries do not work on headless (gl less) systems (#277) · Issues · ParaView / ParaView-Superbuild · GitLab (kitware.com)](https://gitlab.kitware.com/paraview/paraview-superbuild/-/issues/277)

---

<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: [May 14, 2024, 1:43pm UTC](https://discourse.paraview.org/t/is-headless-mode-not-working-or-am-i-missing-something/14599/7 "2024-05-14T13:43:58Z")

</div>

We ought to test the headless version on a clean docker image imo.

FYI @cory.quammen
