Hi Matt,
> I set an appropriate EPICS_CA_ADDR_LIST like: export EPICS_CA_ADDR_LIST="hipa-cagw:5062:localhost“
That syntax looks wrong to me. The entries in EPICS_CA_ADDR_LIST should be separated by spaces, so it should be "hipa-cagw:5062 localhost“
I just tested using EPICS_CA_ADDR_LIST with pyepics on rhel7 and it worked fine.
My RHEL7 machine is on subnet 164.54.160.*. There are 2 PVs
13IDA:m1 This is on the same 164.54.160.* subnet as the Linux machine
15IDA:m1 This is on a different subnet 164.54.162.*
Here I set EPICS_CA_ADDR_LIST to only be the local subnet
>setenv EPICS_CA_ADDR_LIST "164.54.160.255"
EPICS base caget can reach 13IDA:m1 but not 15IDA:m1
>caget 13IDA:m1
13IDA:m1 -0.25
>caget 15IDA:m1
Channel connect timed out: '15IDA:m1' not found.
The same is true for Python
>>> import epics
>>> epics.caget('13IDA:m1')
-0.2500000000000009
>>> epics.caget('15IDA:m1')
cannot connect to 15IDA:m1
Now I set EPICS_CA_ADDR_LIST to also include the broadcast address of the remote 164.54.162.* network.
>setenv EPICS_CA_ADDR_LIST "164.54.160.255 164.54.162.255"
Now EPICS base caget can also reach 15IDA:m1.
>caget 13IDA:m1
13IDA:m1 -0.25
>caget 15IDA:m1
15IDA:m1 1.688e-05
And so can Python
>>> import epics
>>> epics.caget('13IDA:m1')
-0.2500000000000009
>>> epics.caget('15IDA:m1')
1.6879999999996897e-05
So I conclude that pyepics is handling EPICS_CA_ADDR_LIST fine. This makes sense, because it is just using the C Channel Access library from base.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Koennecke
Mark (PSI) via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, July 22, 2021 6:17 AM
To: tech-talk at aps.anl.gov
Subject: pyepcis does not seem to honor EPICS_CA_ADDR_LIST
Hi,
I have encountered a problem with pyepics, the most recent version on rhel7.
The trouble is: I have many PV on a local IOC, but also want to access another PV reachable
via a gateway on port 5062.
I set an appropriate EPICS_CA_ADDR_LIST like: export EPICS_CA_ADDR_LIST="hipa-cagw:5062:localhost“,
and this works to my satisfaction with the standard caget from EPICS base.
If I start python from the same terminal == same environment, load pyepics, and try to use
caget() I cannot access any PV’s at all. I have not found any reference to EPICS_CA_ADDR_LIST in the
pyepics docs. Is this a limitation or a bug? Or am I missing something?
We eventually worked around the problem by installing a calc record pointing to the PV accessible through
the gateway in our IOC and this works.
Best Regards,
Mark Koennecke