Failed to open a web file in a remote server (two different servers)

Hi ROOT experts,

I am trying to open a web file while working in a remote server (ssh) and using the Conda environment, but I cannot manage to open the file; however, the same code works on my Mac and I can open the file with no issues.
Here’s the code:

import ROOT
from ROOT import TFile, TTree

ROOT.gPluginMgr.LoadHandlersFromPluginDirs()
ROOT.gPluginMgr.AddHandler("TFile", "^http[s]?:", "TWebFile", "Net", "TWebFile(const char*,Option_t*)")

file_in = TFile.Open("https://PASSWORD@SERVER/data/handcarry23/root/station23/run1000/waveforms.root")

tree = file_in.Get("waveforms")

I get errors when I work in the remote server:
(But it works on my local machine…)

Error in <TWebFile::GetFromWeb10>: error sending command to host SERVER
Error in <TKey::ReadFile>: Failed to read data.
Error R__unzip_header: error in header.  Values: 00

How can I solve this issue in the server?

Thank you!

ROOT Version: 6.28/04
Platform: Not Provided
Compiler: Not Provided


Hi,

Thanks for the post.
I am not sure how to intervene on the server.
Naive question: the error says error sending command to host SERVER - you are using the right name in your code and obfuscating it for the post, right?
For what concerns ROOT, do you know what is the difference between your installations?

Cheers,
D

Hi Danilo,

Thanks for the reply. To your first question, yes I am here using the word SERVER but it’s supposed to be the actual server address that I am not showing in the post.

On my Mac, I installed ROOT from Homebrew and its version is 6.26/06, I use python3.10 to run the code, and it’s not run in a virtual environment.

On the server (ssh), I installed ROOT from mini conda, its version is 6.28/04, and I run the code in a Conda virtual environment.

Hi,

Thanks.
It seems that there is something wrong with the Conda environment then. Do you have means to use ROOT from another installation as a test?

Cheers,
D

Hi Danilo,

Sorry for getting back to you late but I have been trying to figure out how to make it work, I can use ROOT from a few other sources such as CVMFS but not easily from a different installation. The thing is that I also need to use some other dependancies/packages to call some custom types for the variables in the trees from those root files that I am trying to open remotely, I kinda have no other choices because I cannot successfully build one of the dependancies outside of Conda, I have everything I need in the Conda environment, but I don’t know why opening web files doesn’t work in the environment, may I ask you what might be the cause or if there’s a way to make it work in the environment? It’s an awkward situation for me, and I am sorry I am making it more difficult :frowning:

By the way, it works when I use the ROOT from CVMFS and there’s no errors, so you were absolutely right, that issue came from the Conda environment, but I just don’t understand why. I guess I will just have to make it work building the dependency outside of the Conda environment, but that’s a different issue then :face_with_spiral_eyes:

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