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: p4p timeout on get() in broadcastless network
From: Ulrik Pedersen via Tech-talk <tech-talk at aps.anl.gov>
To: Tech talk <tech-talk at aps.anl.gov>
Date: Fri, 23 Jan 2026 16:44:23 +0000
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 Freddie Akeroyd - STFC UKRI via Tech-talk

Navigate by Date:
Prev: How to home translation stage with no encoder/home-switches using motorOmsAsyn Marvin Noll via Tech-talk
Next: RE: p4p timeout on get() in broadcastless network Freddie Akeroyd - STFC UKRI 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: How to home translation stage with no encoder/home-switches using motorOmsAsyn Marvin Noll via Tech-talk
Next: RE: p4p timeout on get() in broadcastless network Freddie Akeroyd - STFC UKRI 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 ·