# Auth failed error when opening files using XRootD in pyROOT

**URL:** <https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862>\
**Category:** ROOT\
**Created:** [April 5, 2024, 5:57am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862 "2024-04-05T05:57:20Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 5:57am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/1 "2024-04-05T05:57:20Z")

</div>

Hi,

I am trying to read a tree with TChain from lxplus and using xrootd.

This is what I do:

> kinit eballabe@CERN.CH

with klist I get:

> Issued Expires Principal  
> Apr 5 05:49:42 2024 Apr 6 06:49:41 2024 krbtgt/CERN.CH@CERN.CH  
> Apr 5 07:33:10 2024 Apr 6 06:49:41 2024 xrootd/eoshome.cern.ch@CERN.CH

I am able to open it with xrootd and to see its content in this way

> root -l -e ‘TFile::Open(“root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root” )’  
> new TBrowser()

However, when I run my pyROOT code it gives me one error. In my code, what I do is:

> from ROOT import TChain  
> chain = TChain( ‘data22’)  
> chain.Add(‘root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root’ )  
> chain.Project(“data\_hist”,“met”,“1”)

which gives me this error

> Error in TNetXNGFile::Open: [FATAL] Auth failed: Could not load authentication handler.

However, if I download it locally, it works

> chain = TChain( ‘data22’)  
> chain.Add( ‘/Users/ericballabene/data22\_merged\_processed.root’ )  
> 1  
> chain.Project(“data\_hist”,“met”,“1”)  
> 241366

Best,  
Eric

_ROOT Version:_ 6.30.06  
_Platform:_ MacOS 14.4.1

* * *

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [April 5, 2024, 7:00am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/2 "2024-04-05T07:00:04Z")

</div>

Hi Eric,

Thanks for the post.  
This is not expected. I would like to ask you to perform a few tests to gather a more complete view of what is happening:

1. Is the ROOT used via Python the same you are using in C++? (`ROOT.gROOT.GetVersion()`)
2. Can you build the same chain from C++?
3. Could you set the environment variable `ROOTDEBUG=1` (or 2 or higher) and go through the messages to see whether the logs reveal some issue with the authentication?

Best,  
D

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 9:46am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/3 "2024-04-05T09:46:46Z")

</div>

Hi Danilo,

as far as I can tell it’s a problem happening only with python.

1. 

> Python 3.9.6 (default, Feb 3 2024, 15:58:27)  
> [Clang 15.0.0 (clang-1500.3.9.4)] on darwin  
> Type “help”, “copyright”, “credits” or “license” for more information.
> 
> > import ROOT  
> > ROOT.gROOT.GetVersion()
> > 
> > > ‘6.30/06’

1. I built this _macro.C_,

> #include \<TChain.h\>  
> #include \<TFile.h\>  
> #include \<TH1F.h\>  
> int main() {  
> TChain \*chain = new TChain(“data22”);  
> chain-\>Add(“root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root”);  
> TH1F \*data\_hist = new TH1F(“data\_hist”, “MET Histogram”, 100, 0, 1000);  
> chain-\>Project(“data\_hist”, “met”, “1”);  
> TFile \*outputFile = new TFile(“output.root”, “RECREATE”);  
> data\_hist-\>Write();  
> outputFile-\>Close();  
> delete chain;  
> delete data\_hist;  
> return 0;  
> }

this works nicely with

> root -l  
> .L macro.C  
> main()

and it gives me the output tree with the histogram without errors.

A python equivalent, _macro.py_,

> from ROOT import TChain, TFile, TH1F  
> def main():  
> chain = TChain(“data22”)  
> chain.Add(“root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root”)  
> data\_hist = TH1F(“data\_hist”, “MET Histogram”, 100, 0, 1000)  
> chain.Project(“data\_hist”, “met”, “1”)  
> outputFile = TFile(“output.root”, “RECREATE”)  
> data\_hist.Write()  
> outputFile.Close()  
> if **name** == “ **main** ”:  
> #main(sys.argv)  
> main()

when I do

> python3 main.py

gives me

> Error in TNetXNGFile::Open: [FATAL] Auth failed: Could not load authentication handler.

1. I have setup ROOTDEBUG=1 or ROOTDEBUG=2 in my terminal before doing

> python3 main.py

but this does not change the output.

Cheers,  
Eric

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [April 5, 2024, 11:40am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/4 "2024-04-05T11:40:38Z")

</div>

Hi Eric,  
Thanks for following up.  
About `ROOTDEBUG`, either you export the variable or you prepend it to the invocation:

```auto
export ROOTDEBUG=2
python3 main.py

```

or

```auto
ROOTDEBUG=2 python3 main.py

```

The output will be interesting.

Cheers,  
D

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 11:55am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/5 "2024-04-05T11:55:44Z")

</div>

Right, I missed the export before ROOTDEBUG=2.

Here’s the log  
[log.out.txt](https://root-forum.cern.ch/uploads/short-url/ugv6dS4HaNfVK3RXyVBh8cglDb9.txt) (200.7 KB)

Cheers,  
Eric

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [April 5, 2024, 12:28pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/6 "2024-04-05T12:28:08Z")

</div>

Thanks,

What is the difference between that log and the same obtained in C++? Perhaps the krb token not found or similar issues?

Best,  
D

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 1:58pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/7 "2024-04-05T13:58:44Z")

</div>

In python

> Info in TInterpreter::TCling::AutoParse: Trying to autoparse for \_\_cling\_Un1Qu332  
> Info in TInterpreter::TCling::AutoParse: Starting autoparse for \_\_cling\_Un1Qu332

in c++

> Info in TInterpreter::TCling::AutoParse: Trying to autoparse for \_\_cling\_Un1Qu36  
> Info in TInterpreter::TCling::AutoParse: Starting autoparse for \_\_cling\_Un1Qu36

and similar.

In python

> Info in TInterpreter::TCling::AutoParse: Trying to autoparse for \_\_cf\_13  
> Info in TInterpreter::TCling::AutoParse: Starting autoparse for \_\_cf\_13

in c++

> Info in TInterpreter::TCling::AutoParse: Trying to autoparse for \_\_cf\_1  
> Info in TInterpreter::TCling::AutoParse: Starting autoparse for \_\_cf\_1.

In python

> Error in TNetXNGFile::Open: [FATAL] Auth failed: Could not load authentication handler.  
> Info in TInterpreter::TCling::AutoParse: Trying to autoparse for TMessageHandler  
> Info in TInterpreter::TCling::AutoParse: Starting autoparse for TMessageHandler

in c++

> Info in TNetXNGFile::ReadBuffer: offset: 0 length: 300  
> Info in TNetXNGFile::ReadBuffer: [SUCCESS] bytes read: 300  
> Info in TNetXNGFile::ReadBuffer: offset: 100 length: 202  
> Info in TNetXNGFile::ReadBuffer: [SUCCESS] bytes read: 202  
> Info in TNetXNGFile::ReadBuffer: offset: 19058178 length: 137  
> Info in TNetXNGFile::ReadBuffer: [SUCCESS] bytes read: 137  
> TKey Reading 137 bytes at address 19058178.

No mention of the krb token or similar

Cheers,  
Eric

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [April 5, 2024, 2:08pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/8 "2024-04-05T14:08:31Z")

</div>

Did you try with higher verbosity levels? Does the same happen from a lxplus node?

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 2:29pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/9 "2024-04-05T14:29:43Z")

</div>

I haven’t tried with other verbosity levels. python code works on lxplus.

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 2:34pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/10 "2024-04-05T14:34:16Z")

</div>

Possibly this was already reported here

> [@PyROOT cannot open file: "Error in \<TNetXNGFile::Open\>: \[FATAL\] Auth failed"](https://root-forum.cern.ch/t/pyroot-cannot-open-file-error-in-tnetxngfile-open-fatal-auth-failed/26593):
>
> on macOS, in a ROOT session, I can open this file just fine: $ root ----------------------------------------------------------------- | Welcome to ROOT 6.11/03 http://root.cern.ch | | (c) 1995-2017, The ROOT Team | | Built for macosx64 | | From heads/master@v6-11-02-3-g9bb8349ee6, Oct 10 2017, 13:40:35 | | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' | --------…

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 5, 2024, 5:24pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/11 "2024-04-05T17:24:38Z")

</div>

I have also tried

> import ROOT  
> f = ROOT.TFile.Open(‘root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root’)

and this gives me

> Error in TNetXNGFile::Open: [FATAL] Auth failed: Could not load authentication handler.

So I think it’s a problem of XRootD accessing eos files with pyROOT (nothing to do with TChain in particular) and I’m wondering if that happens only to me or it is a general pyROOT issue

Cheers,  
Eric

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [April 5, 2024, 8:32pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/12 "2024-04-05T20:32:54Z")

</div>

@amadio Any ideas?

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [April 7, 2024, 9:17am UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/13 "2024-04-07T09:17:02Z")

</div>

Since the code works on lxplus, it is not too likely that this is a generic PyROOT issue, right?  
It would be interesting after increasing the verbosity to see whether indications are present about why the authentication process is not working on your system.  
But indeed @amadio is the right expert to comment about this issue.

Best,  
Danilo

---

<div class="post-metadata">

**Author:** ![eballabe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eballabe/32/21846_2.png) [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Post date:** [April 8, 2024, 1:56pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/14 "2024-04-08T13:56:49Z")

</div>

Yes, it works on lxplus but also XRootD is not needed to access eos files on lxplus.  
I increased the verbosity with

> export XRD\_LOGLEVEL=“Debug”

and got

> import ROOT  
> f = ROOT.TFile.Open(‘root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root’)
> 
> > [2024-04-08 15:50:59.846238 +0200][Debug][Utility] Initializing xrootd client version: v5.5.2  
> > [2024-04-08 15:50:59.846474 +0200][Warning][Utility] Unable to process global config file: [ERROR] OS Error: no such file or directory  
> > [2024-04-08 15:50:59.846490 +0200][Debug][Utility] Unable to process user config file: [ERROR] OS Error: no such file or directory  
> > [2024-04-08 15:50:59.846821 +0200][Debug][PlugInMgr] Initializing plug-in manager…  
> > [2024-04-08 15:50:59.846826 +0200][Debug][PlugInMgr] No default plug-in, loading plug-in configs…  
> > [2024-04-08 15:50:59.846838 +0200][Debug][PlugInMgr] Processing plug-in definitions in /etc/xrootd/client.plugins.d…  
> > [2024-04-08 15:50:59.846848 +0200][Debug][PlugInMgr] Unable to process directory /etc/xrootd/client.plugins.d: [ERROR] OS Error: no such file or directory  
> > [2024-04-08 15:50:59.846851 +0200][Debug][PlugInMgr] Processing plug-in definitions in /Users/ericballabene/.xrootd/client.plugins.d…  
> > [2024-04-08 15:50:59.846855 +0200][Debug][PlugInMgr] Unable to process directory /Users/ericballabene/.xrootd/client.plugins.d: [ERROR] OS Error: no such file or directory  
> > [2024-04-08 15:50:59.846858 +0200][Debug][Utility] Attempting to pre-load: libXrdSeckrb5.so  
> > [2024-04-08 15:50:59.847104 +0200][Error][Utility] Unable to pre-load libXrdSeckrb5.so: Plugin unable to load libXrdSeckrb5-5.so; dlopen(libXrdSeckrb5-5.so, 0x0100): tried: ‘libXrdSeckrb5-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSeckrb5-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSeckrb5-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSeckrb5-5.so’ (no such file), ‘/usr/lib/libXrdSeckrb5-5.so’ (no such file, not in dyld cache), ‘libXrdSeckrb5-5.so’ (no such file)  
> > [2024-04-08 15:50:59.847115 +0200][Debug][Utility] Attempting to pre-load: libXrdSecgsi.so  
> > [2024-04-08 15:50:59.847259 +0200][Error][Utility] Unable to pre-load libXrdSecgsi.so: Plugin unable to load libXrdSecgsi-5.so; dlopen(libXrdSecgsi-5.so, 0x0100): tried: ‘libXrdSecgsi-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSecgsi-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecgsi-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecgsi-5.so’ (no such file), ‘/usr/lib/libXrdSecgsi-5.so’ (no such file, not in dyld cache), ‘libXrdSecgsi-5.so’ (no such file)  
> > [2024-04-08 15:50:59.847265 +0200][Debug][Utility] Attempting to pre-load: libXrdSecgsiAuthzVO.so  
> > [2024-04-08 15:50:59.847408 +0200][Error][Utility] Unable to pre-load libXrdSecgsiAuthzVO.so: Plugin unable to load libXrdSecgsiAuthzVO-5.so; dlopen(libXrdSecgsiAuthzVO-5.so, 0x0100): tried: ‘libXrdSecgsiAuthzVO-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSecgsiAuthzVO-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecgsiAuthzVO-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecgsiAuthzVO-5.so’ (no such file), ‘/usr/lib/libXrdSecgsiAuthzVO-5.so’ (no such file, not in dyld cache), ‘libXrdSecgsiAuthzVO-5.so’ (no such file)  
> > [2024-04-08 15:50:59.847414 +0200][Debug][Utility] Attempting to pre-load: libXrdSecgsiGMAPDN.so  
> > [2024-04-08 15:50:59.847551 +0200][Error][Utility] Unable to pre-load libXrdSecgsiGMAPDN.so: Plugin unable to load libXrdSecgsiGMAPDN-5.so; dlopen(libXrdSecgsiGMAPDN-5.so, 0x0100): tried: ‘libXrdSecgsiGMAPDN-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSecgsiGMAPDN-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecgsiGMAPDN-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecgsiGMAPDN-5.so’ (no such file), ‘/usr/lib/libXrdSecgsiGMAPDN-5.so’ (no such file, not in dyld cache), ‘libXrdSecgsiGMAPDN-5.so’ (no such file)  
> > [2024-04-08 15:50:59.847557 +0200][Debug][Utility] Attempting to pre-load: libXrdSecpwd.so  
> > [2024-04-08 15:50:59.847692 +0200][Error][Utility] Unable to pre-load libXrdSecpwd.so: Plugin unable to load libXrdSecpwd-5.so; dlopen(libXrdSecpwd-5.so, 0x0100): tried: ‘libXrdSecpwd-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSecpwd-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecpwd-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecpwd-5.so’ (no such file), ‘/usr/lib/libXrdSecpwd-5.so’ (no such file, not in dyld cache), ‘libXrdSecpwd-5.so’ (no such file)  
> > [2024-04-08 15:50:59.847697 +0200][Debug][Utility] Attempting to pre-load: libXrdSecsss.so  
> > [2024-04-08 15:50:59.847827 +0200][Error][Utility] Unable to pre-load libXrdSecsss.so: Plugin unable to load libXrdSecsss-5.so; dlopen(libXrdSecsss-5.so, 0x0100): tried: ‘libXrdSecsss-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSecsss-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecsss-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecsss-5.so’ (no such file), ‘/usr/lib/libXrdSecsss-5.so’ (no such file, not in dyld cache), ‘libXrdSecsss-5.so’ (no such file)  
> > [2024-04-08 15:50:59.847832 +0200][Debug][Utility] Attempting to pre-load: libXrdSecunix.so  
> > [2024-04-08 15:50:59.847968 +0200][Error][Utility] Unable to pre-load libXrdSecunix.so: Plugin unable to load libXrdSecunix-5.so; dlopen(libXrdSecunix-5.so, 0x0100): tried: ‘libXrdSecunix-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSecunix-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecunix-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSecunix-5.so’ (no such file), ‘/usr/lib/libXrdSecunix-5.so’ (no such file, not in dyld cache), ‘libXrdSecunix-5.so’ (no such file)  
> > [2024-04-08 15:50:59.921124 +0200][Debug][Utility] Env: overriding entry: multiprotocol=0 with 1  
> > [2024-04-08 15:50:59.921189 +0200][Debug][File] [0x3ef71fa8@root://eosuser.cern.ch:1094//eos/user/e/eballabe/merged/data22\_merged\_processed.root?xrdcl.requuid=D1BCB790-E8AC-403E-8573-B16A6B40A979] Sending an open command  
> > [2024-04-08 15:50:59.921219 +0200][Debug][Utility] Env: trying to get a non-existent string entry: pollerpreference  
> > [2024-04-08 15:50:59.921223 +0200][Debug][Poller] Available pollers: built-in  
> > [2024-04-08 15:50:59.921225 +0200][Debug][Poller] Attempting to create a poller according to preference: built-in  
> > [2024-04-08 15:50:59.921228 +0200][Debug][Poller] Creating poller: built-in  
> > [2024-04-08 15:50:59.921231 +0200][Debug][Poller] Creating and starting the built-in poller…  
> > [2024-04-08 15:50:59.921290 +0200][Debug][Poller] Using 1 poller threads  
> > [2024-04-08 15:50:59.921294 +0200][Debug][TaskMgr] Starting the task manager…  
> > [2024-04-08 15:50:59.921306 +0200][Debug][TaskMgr] Task manager started  
> > [2024-04-08 15:50:59.921309 +0200][Debug][JobMgr] Starting the job manager…  
> > [2024-04-08 15:50:59.921330 +0200][Debug][JobMgr] Job manager started, 3 workers  
> > [2024-04-08 15:50:59.921334 +0200][Debug][TaskMgr] Registering task: “FileTimer task” to be run at: [2024-04-08 15:50:59 +0200]  
> > [2024-04-08 15:50:59.921350 +0200][Debug][ExDbgMsg] [eosuser.cern.ch:1094] MsgHandler created: 0x3ef77c30 (message: kXR\_open (file: /eos/user/e/eballabe/merged/data22\_merged\_processed.root, mode: 00, flags: kXR\_open\_read kXR\_async kXR\_retstat ) ).  
> > [2024-04-08 15:50:59.921361 +0200][Debug][PostMaster] Creating new channel to: root://eosuser.cern.ch:1094/  
> > [2024-04-08 15:50:59.921398 +0200][Debug][PostMaster] [eosuser.cern.ch:1094] Stream parameters: Network Stack: IPAuto, Connection Window: 120, ConnectionRetry: 5, Stream Error Window: 1800  
> > [2024-04-08 15:50:59.921404 +0200][Debug][TaskMgr] Registering task: “TickGeneratorTask for: root://eosuser.cern.ch:1094/” to be run at: [2024-04-08 15:51:14 +0200]  
> > [2024-04-08 15:50:59.928057 +0200][Debug][PostMaster] [eosuser.cern.ch:1094] Found 1 address(es): [::ffff:188.184.103.122]:1094  
> > [2024-04-08 15:50:59.928079 +0200][Debug][AsyncSock] [eosuser.cern.ch:1094.0] Attempting connection to [::ffff:188.184.103.122]:1094  
> > [2024-04-08 15:50:59.928152 +0200][Debug][Poller] Adding socket 0x2c64a00 to the poller  
> > [2024-04-08 15:50:59.934317 +0200][Debug][AsyncSock] [eosuser.cern.ch:1094.0] Async connection call returned  
> > [2024-04-08 15:50:59.934328 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] Sending out the initial hand shake + kXR\_protocol  
> > [2024-04-08 15:50:59.938765 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] Got the server hand shake response (type: server , protocol version 511)  
> > [2024-04-08 15:50:59.940064 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] kXR\_protocol successful (type: server , protocol version 511)  
> > [2024-04-08 15:50:59.941786 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] Sending out kXR\_login request, username: ericball, cgi: xrd.cc=ch&xrd.tz=1&xrd.appname=Python&xrd.info=&xrd.hostname=ericmacbook.dyndns.cern.ch&xrd.rn=v5.5.2, dual-stack: true, private IPv4: false, private IPv6: false  
> > [2024-04-08 15:50:59.945573 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] Logged in, session: 7a11b8018c5800001f1a00005ce1b901  
> > [2024-04-08 15:50:59.945580 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] Authentication is required: &P=krb5,xrootd/eoshome.cern.ch@CERN.CH&P=gsi,v:10600,c:ssl,ca:5168735f.0|4339b4bc.0&P=unix&P=sss,0.+13:/etc/eos.keytab  
> > [2024-04-08 15:50:59.945584 +0200][Debug][XRootDTransport] [eosuser.cern.ch:1094.0] Sending authentication data  
> > [2024-04-08 15:50:59.946045 +0200][Error][XRootDTransport] Unable to get the security framework: Plugin dlopen(libXrdSec-5.so, 0x0100): tried: ‘libXrdSec-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OSlibXrdSec-5.so’ (no such file), ‘/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSec-5.so’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/sftnight/ROOT-CI/build/builtins/xrootd/XROOTD-prefix/lib/libXrdSec-5.so’ (no such file), ‘/usr/lib/libXrdSec-5.so’ (no such file, not in dyld cache), ‘libXrdSec-5.so’ (no such file) seclib libXrdSec-5.so  
> > [2024-04-08 15:50:59.949743 +0200][Error][AsyncSock] [eosuser.cern.ch:1094.0] Socket error while handshaking: [FATAL] Auth failed  
> > [2024-04-08 15:50:59.949751 +0200][Debug][AsyncSock] [eosuser.cern.ch:1094.0] Closing the socket  
> > [2024-04-08 15:50:59.949755 +0200][Debug][Poller] \<[::ffff:194.12.146.127]:56206\>\<–\>\<[::ffff:188.184.103.122]:1094\> Removing socket from the poller  
> > [2024-04-08 15:50:59.949787 +0200][Error][PostMaster] [eosuser.cern.ch:1094] elapsed = 0, pConnectionWindow = 120 seconds.  
> > [2024-04-08 15:50:59.949796 +0200][Error][PostMaster] [eosuser.cern.ch:1094] Unable to recover: [FATAL] Auth failed.  
> > [2024-04-08 15:50:59.949800 +0200][Error][XRootD] [eosuser.cern.ch:1094] Impossible to send message kXR\_open (file: /eos/user/e/eballabe/merged/data22\_merged\_processed.root, mode: 00, flags: kXR\_open\_read kXR\_async kXR\_retstat ). Trying to recover.  
> > [2024-04-08 15:50:59.949804 +0200][Debug][XRootD] [eosuser.cern.ch:1094] Handling error while processing kXR\_open (file: /eos/user/e/eballabe/merged/data22\_merged\_processed.root, mode: 00, flags: kXR\_open\_read kXR\_async kXR\_retstat ): [FATAL] Auth failed.  
> > [2024-04-08 15:50:59.949808 +0200][Debug][ExDbgMsg] [eosuser.cern.ch:1094] Passing to the thread-pool MsgHandler: 0x3ef77c30 (message: kXR\_open (file: /eos/user/e/eballabe/merged/data22\_merged\_processed.root, mode: 00, flags: kXR\_open\_read kXR\_async kXR\_retstat ) ).  
> > [2024-04-08 15:50:59.949831 +0200][Debug][ExDbgMsg] [eosuser.cern.ch:1094] Calling MsgHandler: 0x3ef77c30 (message: kXR\_open (file: /eos/user/e/eballabe/merged/data22\_merged\_processed.root, mode: 00, flags: kXR\_open\_read kXR\_async kXR\_retstat ) ) with status: [FATAL] Auth failed.  
> > [2024-04-08 15:50:59.949888 +0200][Debug][File] [0x3ef71fa8@root://eosuser.cern.ch:1094//eos/user/e/eballabe/merged/data22\_merged\_processed.root?xrdcl.requuid=D1BCB790-E8AC-403E-8573-B16A6B40A979] Open has returned with status [FATAL] Auth failed: Could not load authentication handler.  
> > [2024-04-08 15:50:59.949894 +0200][Debug][File] [0x3ef71fa8@root://eosuser.cern.ch:1094//eos/user/e/eballabe/merged/data22\_merged\_processed.root?xrdcl.requuid=D1BCB790-E8AC-403E-8573-B16A6B40A979] Error while opening at eosuser.cern.ch:1094: [FATAL] Auth failed: Could not load authentication handler.  
> > [2024-04-08 15:50:59.949899 +0200][Debug][Utility] Monitor library name not set. No monitoring  
> > [2024-04-08 15:50:59.949905 +0200][Debug][ExDbgMsg] [eosuser.cern.ch:1094] Destroying MsgHandler: 0x3ef77c30.  
> > Error in TNetXNGFile::Open: [FATAL] Auth failed: Could not load authentication handler.  
> > Traceback (most recent call last):  
> > File “”, line 1, in   
> > File “/Applications/root\_v6.30.06/lib/ROOT/\_pythonization/\_tfile.py”, line 103, in \_TFileOpen  
> > raise OSError(‘Failed to open file {}’.format(str(args[0])))  
> > OSError: Failed to open file root://eosuser.cern.ch://eos/user/e/eballabe/merged/data22\_merged\_processed.root  
> > 2024-04-08 15:51:00.149 Python[87676:3983700] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.

My ROOT version is 6.30.06 binary (to avoid compiling it).

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [April 11, 2024, 1:39pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/15 "2024-04-11T13:39:27Z")

</div>

Dear @eballabe ,

Thanks for reaching out on the forum!

> XRootD is not needed to access eos files on lxplus.

I am not sure what you mean here. You do need xrootd to read files such as `root://eos.../mypath/myfile.root` if you are on lxplus. Maybe you mean that you can use the POSIX interface a-la `/eos/user/..../myfile.root` because EOS is mounted, but that in general is discouraged for performance and stability reasons.

> [@eballabe](#):
>
> 2024-04-08 15:50:59.847104 +0200][Error][Utility] Unable to pre-load libXrdSeckrb5.so:

This and similar errors are probably the real cause, somehow ROOT cannot load the correct XRootD plugins (and somehow only when running within a Python session). I guess if you repeat the same test with `TFile::Open` from the ROOT prompt you don’t see the same errors, right?

Meanwhile, I will try to reproduce your situation on a Mac machine and report back.

Cheers,  
Vincenzo

---

<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:** [April 25, 2024, 1:39pm UTC](https://root-forum.cern.ch/t/auth-failed-error-when-opening-files-using-xrootd-in-pyroot/58862/16 "2024-04-25T13:39:41Z")

</div>

Closed on April 25, 2024, 1:39pm UTC

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