# Error in \<RootX11IOErrorHandler\>: fatal X11 error (connection to server lost?!) during nohup

**URL:** <https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738>\
**Category:** ROOT\
**Created:** [September 19, 2018, 1:01pm UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738 "2018-09-19T13:01:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![adsherman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/73ab20/32.png) [@adsherman](https://root-forum.cern.ch/u/adsherman)\
**Post date:** [September 19, 2018, 1:01pm UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/1 "2018-09-19T13:01:05Z")

</div>

* * *

_ROOT Version:_ 6.04  
_Platform:_ Linux CentOS 6.4 (final)  
_Compiler:_ g++

* * *

I occasionally run into this X11 error after disconnecting from a session, while I have code running nohup’d in the background. As far as I understand nohup should be disconnecting stdout and stderr, so something like this should not happen. Is this a known problem and potentially has a known solution that would be great.

I suspect it might happen while writing TCanvas() objects, but I have set batch mode to true so it does not interact at all with X11, I would think?

Thanks,  
-Alex

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 19, 2018, 1:23pm UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/2 "2018-09-19T13:23:08Z")

</div>

May be you can find some help with these posts:

> [@Linux command nohup and Root](https://root-forum.cern.ch/t/linux-command-nohup-and-root/4799/4):
>
> Hi, it might be that ROOT needs to access a real terminal, and stops execution if the terminal is blocked (which is the case for nohup, if I remember correctly). Did you try screen? Axel.

[https://root.cern.ch/root/roottalk/roottalk01/2640.html](https://root.cern.ch/root/roottalk/roottalk01/2640.html)

---

<div class="post-metadata">

**Author:** ![adsherman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/73ab20/32.png) [@adsherman](https://root-forum.cern.ch/u/adsherman)\
**Post date:** [September 20, 2018, 11:27am UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/3 "2018-09-20T11:27:55Z")

</div>

It works sometimes, just not all the time. The bigger the job, the more likely that it crashes from what I have ascertained. I can’t pin down a clear pattern otherwise. I can try screen and see if it works

edit – Screen also throws X11 errors, the same ones.

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [September 21, 2018, 7:53am UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/4 "2018-09-21T07:53:44Z")

</div>

You should definitely not get X11 errors in batch mode! Could you send us a reproducer? In general, libX11 (and `libGX11TTF.so` / `libGX11.so`) must not be loaded. You could check the output of `gSystem->GetLibraries()` and look for `X11`.

---

<div class="post-metadata">

**Author:** ![adsherman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/73ab20/32.png) [@adsherman](https://root-forum.cern.ch/u/adsherman)\
**Post date:** [September 23, 2018, 9:40pm UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/5 "2018-09-23T21:40:54Z")

</div>

Hi Axel,

I can’t actually consistently reproduce this at all. It is buried in a larger multiprocessing pool based steering macro and I have never managed any reproduction, much less a minimal case.

I will try to check gSystem.GetLibraries() at various stages of the program see where X11 is missing! Is it possible that gROOT is changing settings in a wider (or shallower) scope that one might naively expect in a python script?

Thanks,  
-Alex

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [September 24, 2018, 9:33am UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/6 "2018-09-24T09:33:28Z")

</div>

Hi Alex,

The contrary - libX11-related libraries should _not_ be loaded in batch mode. PyROOT is expected to obey the batch mode, too, and should not trigger loading of X11 libraries either.

Cheers, Axel

---

<div class="post-metadata">

**Author:** ![adsherman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/73ab20/32.png) [@adsherman](https://root-forum.cern.ch/u/adsherman)\
**Post date:** [September 24, 2018, 10:02am UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/7 "2018-09-24T10:02:15Z")

</div>

Hi Axel,

Okay! I will check to make sure they are not loaded.

Thanks,  
-Alex

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [October 8, 2018, 10:02am UTC](https://root-forum.cern.ch/t/error-in-rootx11ioerrorhandler-fatal-x11-error-connection-to-server-lost-during-nohup/30738/8 "2018-10-08T10:02:17Z")

</div>

Closed on October 8, 2018, 10:02am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
