Accessing the QCDB from outside via the O2 CCDB interface tools

Dear experts,
I’m trying to download some of the files on the QCDB to my local machine using the CCDBApi and/or command-line tools described in AliceO2/CCDB. I’m using the lxplus proxy and I am able to access both the ali-qcg and ali-qcdb via Firefox and Chrome, so I suspect the DNS configuration discussed in this thread is set up correctly on my system and is not the culprit here, but I’m not certain.
When I try to download files with the command line tool below I get the following error:

$ o2-ccdb-downloadccdbfile --host ali-qcg.cern.ch:8083 --path qc/TPC/MO/PID/hdEdxMax --dest /tmp/CCDB --timestamp -1

> Querying host ali-qcg.cern.ch:8083 for path qc/TPC/MO/PID/hdEdxMax and timestamp 1643806837131
> [ERROR] curl_easy_perform() failed: Couldn't connect to server
> [ERROR] No ETag found in header for path qc/TPC/MO/PID/hdEdxMax. Aborting.

Similarly, if I run the simple macro below using the CCDBApi I get a similar connection error:

> #include "CCDB/CcdbApi.h"
> using namespace o2;
> 
> void testQCDBConnection(){
>     ccdb::CcdbApi API; // Initialize CCDB API
>     map<std::string, std::string> metadata;
>     api.init("http://ali-qcdb.cern.ch:8083/");  // http://ccdb-test.cern.ch:8080 for test-ccdb
> 
>     std::string path = "qc/TPC/MO/PID/.*"; // Choose which directory to list
> 
>     std::string file_list = api.list(path); // Read a list of all files in directory
>     std::cout << file_list << std::endl;
> }

channel 3: open failed: connect failed: No route to host

Both of these work as expected if I change the URL with http://ccdb-test.cern.ch:8080/.

Have you perhaps encountered a similar problem before or have any ideas what might be the issue in my case? Are you for example able to access the QCDB with similar commands to the one listed above from within the CERN network without needing the proxy?
I look forward to hearing your ideas and thanks for the continued support!

Cheers,
Berkin

Hello,

I now also tried running the commands described above from inside the lxplus via CVFMS and they work as expected. So it seems to indeed be an issue with how the DNS queries are handled on my side when trying with the proxy connection.

I found a workaround for the moment:

  1. I connect to the lxplus via ssh -D 12345 myCERNuserID@lxplus7.cern.ch
  2. I get the IP of the QCDB by pinging ali-qcdb.cern.ch (from inside the lxplus otherwise it is not found)
  3. I run the o2-ccdb-downloadfile using the IP address on another terminal while the lxplus proxy is still running

> o2-ccdb-downloadccdbfile --host 10.161.69.62:8083 --path qc/TPC/MO/Tracks/hEta --dest . --timestamp -1

Any suggestions on how to make it work with the domain name (without needing to get the IP) would be greatly appreciated! I’m using a CentOS 8 machine. Or, if you notice any potential problems with this approach please also let me know so we don’t use it.

Thanks!
Berkin