# How to use dcs-config proxy

**URL:** <https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061>\
**Category:** O² DCS\
**Created:** [August 18, 2021, 7:32am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061 "2021-08-18T07:32:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![syano](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@syano](https://alice-talk.web.cern.ch/u/syano)\
**Post date:** [August 18, 2021, 7:32am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/1 "2021-08-18T07:32:16Z")

</div>

Dear experts,

I have questions for o2-dcs-config-proxy.  
I refer to the following README.md file [AliceO2/README.md at dev · AliceO2Group/AliceO2 · GitHub](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/DCS/testWorkflow/README.md)

To use the workflow, the address=tcp://127.0.0.1:5556 should be set.  
Is the address corresponding to DCS server address?  
The option “ rateLogging=1” is also needed for the workflow.  
Does it mean that trying to access DCS server every one second?

When I used the workflow, I keep getting the following message. Is it working correctly?

[17510:dcs-config-proxy]: [16:28:40][INFO] ackChan[0]: in: 0 (0 MB) out: 0 (0 MB)  
[17510:dcs-config-proxy]: [16:28:40][INFO] dcs-config-proxy[0]: in: 0 (0 MB) out: 0 (0 MB)  
[17510:dcs-config-proxy]: [16:28:41][INFO] ackChan[0]: in: 0 (0 MB) out: 0 (0 MB)  
[17510:dcs-config-proxy]: [16:28:41][INFO] dcs-config-proxy[0]: in: 0 (0 MB) out: 0 (0 MB)  
[17510:dcs-config-proxy]: [16:28:42][INFO] ackChan[0]: in: 0 (0 MB) out: 0 (0 MB)

Satoshi

---

<div class="post-metadata">

**Author:** ![shahoian](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@shahoian](https://alice-talk.web.cern.ch/u/shahoian)\
**Post date:** [August 18, 2021, 10:22am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/2 "2021-08-18T10:22:13Z")

</div>

Hi,

Yes, this is the port of the server to which we subscribed during the test, it may change. The server sends the files only when the DCS team needs to send something to O2, it is not a periodic communication. The test should be arranged with DCs people. The logging rate does not depend on the communications rate.

Cheers  
Rubeb

---

<div class="post-metadata">

**Author:** ![syano](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@syano](https://alice-talk.web.cern.ch/u/syano)\
**Post date:** [August 18, 2021, 2:15pm UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/3 "2021-08-18T14:15:30Z")

</div>

Hi Ruben,

Thank you for your reply.  
I have a responsibility for the CCDB \<—\> DCS connection.  
Of course, we are discussing what we should send to CCDB from DCS, but we would like to understand the tool to do it.  
So I am working on it.

I do several tests related to CCDB with the local server setup explained on the following page ([Local CCDB/QC repository - Google Docs](https://docs.google.com/document/d/1_GM6yY7ejVEIRi1y8Ooc9ongrGgZyCiks6Ca0OAEav8/edit)).  
Now, I would like to check how to send objects to CCDB from DCS with the dummy DCS config file.  
Do you know how to do it?  
If you know the best reference detector and document, please let me know.

Satoshi

---

<div class="post-metadata">

**Author:** ![shahoian](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@shahoian](https://alice-talk.web.cern.ch/u/shahoian)\
**Post date:** [August 21, 2021, 8:13pm UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/4 "2021-08-21T20:13:05Z")

</div>

Hi Satoshi,

You can test it locally, before arranging a real test with DCS server, using the code from  
[https://cernbox.cern.ch/index.php/s/fuaTlK9t7GyGAsa](https://cernbox.cern.ch/index.php/s/fuaTlK9t7GyGAsa)

You will need to install cppzmq (via alidist). Just change the dcssend.cpp:38 from

```auto
 std::string filename = "TOFFEElight.20210108.172639.8000";

```

to the the name of the file you need to send and compile it. Then, run 1st in one terminal the `test.sh` and in another the dcssend.

Cheers,  
Ruben

---

<div class="post-metadata">

**Author:** ![syano](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@syano](https://alice-talk.web.cern.ch/u/syano)\
**Post date:** [August 23, 2021, 5:17am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/5 "2021-08-23T05:17:29Z")

</div>

Dear Ruben,

Thanks a lot for your support!

I succeeded to install cppzmq with the pull request #3048 in alidist.  
After that, I modified the codes in your cern box, but I noticed that “client.cpp” is not put in the cern box. Is it normal?

For the moment, I tried to use dcssend command after compiling dcssend.cpp I keep receiving the following

send trial 0  
waiting for answer 0

send trial 1  
waiting for answer 1

send trial 2  
waiting for answer 2

Is it correct behavior?

Satoshi

---

<div class="post-metadata">

**Author:** ![shahoian](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@shahoian](https://alice-talk.web.cern.ch/u/shahoian)\
**Post date:** [August 23, 2021, 6:50am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/6 "2021-08-23T06:50:01Z")

</div>

Hi @syano

I attach the [client.cpp](https://alice-talk.web.cern.ch/uploads/short-url/hpKWsAO1cljVxCvAXMtkhurSxVl.cpp) (1.2 KB) but you don’t need it: it does that same what dcs-config-proxy does, but via cppzmq means.  
The output of the dcssender is correct but, apparently, the proxy (is it running) does not receive the file. Make sure that the channel/port settings are the same for both sides.

Cheers,  
Ruben

---

<div class="post-metadata">

**Author:** ![syano](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@syano](https://alice-talk.web.cern.ch/u/syano)\
**Post date:** [August 23, 2021, 7:01am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/7 "2021-08-23T07:01:21Z")

</div>

Dear Ruben,

Thank you for your quick response.

I checked the several variables in both dcssend and o2-dcs-config-proxy side, and I got following messages,

In dcssend side:

send trial 0  
waiting for answer 0  
ans:  
send trial 1  
waiting for answer 1  
ans:  
send trial 2  
waiting for answer 2  
ans:  
send trial 3  
waiting for answer 3  
ans:  
send trial 4  
waiting for answer 4  
ans:

In o2-dcs-config-proxy side,  
[39454:dcs-config-proxy]: [15:50:50][INFO] received file MFT\_Dummy\_Config\_File.62c5f1a0-fefe-11eb-8c08-7f0000013346 of size 2048  
[39454:dcs-config-proxy]: [15:50:50][INFO] Sending acknowledgment OK  
[39454:dcs-config-proxy]: [15:50:50][INFO] Sent DPL message and acknowledgment for file MFT\_Dummy\_Config\_File.62c5f1a0-fefe-11eb-8c08-7f0000013346  
[39455:dcs-config-consumer-MFT]: [15:50:50][INFO] got input file MFT\_Dummy\_Config\_File.62c5f1a0-fefe-11eb-8c08-7f0000013346 of size 2048

I think it succeeded to send DCS config file (for the moment mimic file) and to receive it by o2-dcs-config-proxy!  
However, the dcssend doesn’t receive the answer from the proxy in spite that the proxy sends back the acknowledgment…

Satoshi

---

<div class="post-metadata">

**Author:** ![shahoian](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@shahoian](https://alice-talk.web.cern.ch/u/shahoian)\
**Post date:** [August 23, 2021, 7:27am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/8 "2021-08-23T07:27:10Z")

</div>

Hi @syano

Indeed, it looks like the acknowledgment is not received by the sender. Are you sure the ack. ports are consistent?

Cheers,  
Ruben

---

<div class="post-metadata">

**Author:** ![syano](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@syano](https://alice-talk.web.cern.ch/u/syano)\
**Post date:** [August 23, 2021, 7:41am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/9 "2021-08-23T07:41:19Z")

</div>

Dear Ruben,

Thanks for your help.

I set the ack. port 44773 in o2-dcs-config-proxy with  
–acknowlege-to “type=push,method=connect,address=tcp://127.0.0.1:44773,rateLogging=1,transport=zeromq”  
Also, I set the the answer receiving port 44773 with,  
int pub\_port = 44772, col\_port = 44773;  
collector.connect(“tcp://127.0.0.1:” + std::to\_string(col\_port));

It looks they are consistent…

Satoshi

---

<div class="post-metadata">

**Author:** ![shahoian](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@shahoian](https://alice-talk.web.cern.ch/u/shahoian)\
**Post date:** [August 23, 2021, 10:41am UTC](https://alice-talk.web.cern.ch/t/how-to-use-dcs-config-proxy/1061/10 "2021-08-23T10:41:25Z")

</div>

Hi @syano

I think it is better to open a PR with your code, the acknowledgment was tested and working, I can look on this later, when will be back from vacation.

Cheers  
Ruben
