1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: How can I get a PV from an external server from inside a docker container? |
From: | Érico Nogueira Rolim via Tech-talk <tech-talk at aps.anl.gov> |
To: | Carsten Winkler <carsten.winkler at helmholtz-berlin.de>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 26 Mar 2024 20:43:18 +0000 |
Hello Dale, hello Florian,
many thanks for your helpful advises. Now I could solve the issue simply by adding "network_mode: host" to the service "epicsbase".
Now my working docker-compose.yml looks like:
Hi, Carsten!
I didn't suggest using "network_mode: host" because earlier you had mentioned that you had already tried using EPICS_CA_ADDR_LIST inside the container; so the effect of being unable to enumerate interfaces in order to find the broadcast addresses shouldn't
have impacted you... What did you try setting it to? It should have been the IP address of the host serving external_pv, and it should work with or without "network_mode: host", AFAIK.
services:
epicsbase:
image: softioc
container_name: epicsbase
volumes:
- ./epicsbase/db:/usr/local/db
working_dir: /usr/local/epics
command:
- /bin/sh
- -c
- |
echo start first Soft IOC
screen -d -m /usr/local/epics/epics-base/bin/linux-x86_64/softIoc -D /usr/local/epics/epics-base/dbd/softIoc.dbd -d /usr/local/db/test.db
tail -f /dev/null # keep alivenetwork_mode: host
Best regards
Carsten
--------------------Ursprüngliche Nachricht--------------------
Von: Carsten Winkler <carsten.winkler at helmholtz-berlin.de>
Gesendet: Montag 25. März 2024 14:55
An: tech-talk at aps.anl.gov
Betreff: How can I get a PV from an external server from inside a docker container?
Hello,
I have 3 SoftIOCs.
1.) local host = 193.100.100.100 with PV: "local_pv"
2.) external host = 192.200.200.200 with PV: "external_pv"
3.) docker container on local host with PV: "docker_pv"From local host I can read all PVs (caget local_pv external_pv docker_pv). 👍
From inside the docker container I can read the local_pv and the docker_pv
but not the external_pv. 🤔
Here is my docker compose configuration:
services:
epicsbase:
image: softioc
container_name: epicsbase
volumes:
- ./epicsbase/db:/usr/local/db
working_dir: /usr/local/epics
command:
- /bin/sh
- -c
- |
echo start first Soft IOC
screen -d -m /usr/local/epics/epics-base/bin/linux-x86_64/softIoc -D /usr/local/epics/epics-base/dbd/softIoc.dbd -d /usr/local/db/test.db
tail -f /dev/null # keep alive
networks:
- ioc-net
networks:
ioc-net:From inside the docker container I have also already tried EPICS_CA_AUTO_ADDR_LIST / EPICS_CA_ADDR_LIST. Unfortunately without success.
With and without these environment variables I only get the local_pv and the docker_pv.
How can I also read the external_pv from inside the docker container?
Best regards
Carsten
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.