EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <2026 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  <2026
<== Date ==> <== Thread ==>

Subject: Re: p4p timeout on get() in broadcastless network
From: Ulrik Pedersen via Tech-talk <tech-talk at aps.anl.gov>
To: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Cc: Tech talk <tech-talk at aps.anl.gov>
Date: Fri, 23 Jan 2026 17:40:21 +0000
Hi Freddie,

Thanks for pitching in! This is interesting - it does appear to solve the problem!!! I had not even thought of that one because I don't run a name service... Thanks for the hint - I will study this a bit closer to understand why this works!

In the meantime, I have also found another workaround: if I set 127.0.0.1 in the front of my EPICS_PVA_ADDR_LIST then it works both for local host IOCs and other IOCs on the network. 

I'm still baffled why p4p behaves differently from phoebus and the EPICS base pva cli tools which works without setting these variables.

Cheers,
Ulrik

 

On Fri, 23 Jan 2026 at 17:13, Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk> wrote:

Hi Ulrik,

 

Does setting

 

    EPICS_PVA_NAME_SERVERS=10.0.0.12

 

For the client help?

 

Regards,

 

Freddie

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Ulrik Pedersen via Tech-talk
Sent: 23 January 2026 16:44
To: Tech talk <tech-talk at aps.anl.gov>
Subject: p4p timeout on get() in broadcastless network

 

Hello,

 

I am having some trouble getting p4p working reliably in a cloud based network where UDP broadcasts are not possible. I am only using a single VM, running both the IOC and the p4p client on the same VM. The setup works well with Phoebus, archiver, and pvget/pvput/pvmonitor from EPICS base, just not with p4p...

 

I am running an EPICS IOC with PVXS and QSRV2 and just a few PVs. The IOC is running with the following EPICS environment to work around the fact that we can't use broadcast (the 10.0.0.12 is the VMs IP on a private network with archiver, etc.):

 

user02@uservm02:~$ env | grep -i pva | sort

EPICS_PVAS_AUTO_BEACON_ADDR_LIST=NO

EPICS_PVAS_BEACON_ADDR_LIST=10.0.0.12

EPICS_PVAS_BROADCAST_PORT=5076

EPICS_PVAS_SERVER_PORT=5075

EPICS_PVA_ADDR_LIST=10.0.0.12

EPICS_PVA_AUTO_ADDR_LIST=NO

EPICS_PVA_BROADCAST_PORT=5076

 

Then on for the p4p client, I am running with this environment:

 

(epics-training-env) user02@uservm02:~$ env | grep -i pva | sort

EPICS_PVAS_AUTO_BEACON_ADDR_LIST=NO

EPICS_PVAS_BEACON_ADDR_LIST=10.0.0.12

EPICS_PVA_ADDR_LIST=10.0.0.12

EPICS_PVA_AUTO_ADDR_LIST=NO

EPICS_PVA_BROADCAST_PORT=5076

 

(I know the PVAS variables are not needed on the client. I have been tinkering a lot with these today)

 

My python script with p4p looks like this:

 

(epics-training-env) user02@uservm02:~$ cat small.py 

from p4p.client.thread import Context

ctxt = Context('pva')

print(ctxt.get('user02:va:01:gauge:pressure'))

ctxt.close()

 

Sometimes the script will run successfully once or twice, but then it will mostly timeout with this error dump:

 

(epics-training-env) user02@uservm02:~$ python small.py 

Traceback (most recent call last):

  File "/opt/epics/python/.venv/lib/python3.12/site-packages/p4p/client/thread.py", line 264, in get

    value, i = done.get(timeout=timeout)

               ^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/queue.py", line 179, in get

    raise Empty

_queue.Empty

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

  File "/home/user02/small.py", line 3, in <module>

    print(ctxt.get('user02:va:01:gauge:pressure'))

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/epics/python/.venv/lib/python3.12/site-packages/p4p/client/thread.py", line 268, in get

    raise TimeoutError()

TimeoutError

 

I am on an Ubuntu 24.04 VM. Using system python 3.12.3, p4p==4.2.2

 

Hope someone can point out my silly mistake here... 

 

Cheers,

Ulrik

 

 


Replies:
Re: p4p timeout on get() in broadcastless network Michael Davidsaver via Tech-talk
References:
p4p timeout on get() in broadcastless network Ulrik Pedersen via Tech-talk
RE: p4p timeout on get() in broadcastless network Freddie Akeroyd - STFC UKRI via Tech-talk

Navigate by Date:
Prev: Modbus linked read/write question Jesse Hopkins via Tech-talk
Next: Re: Modbus linked read/write question Mark Rivers via Tech-talk
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  <2026
Navigate by Thread:
Prev: RE: p4p timeout on get() in broadcastless network Freddie Akeroyd - STFC UKRI via Tech-talk
Next: Re: p4p timeout on get() in broadcastless network Michael Davidsaver via Tech-talk
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  <2026
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·