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  <20132014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: RE: multiple servers on the same (loopback) interface
From: "Hill, Jeff" <johill@lanl.gov>
To: "Kasemir, Kay" <kasemirk@ornl.gov>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 10 Jul 2013 17:13:26 +0000
I understand that another solution is to run the IOC in a virtualized guest OS.

Jeff

> -----Original Message-----
> From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-
> bounces@aps.anl.gov] On Behalf Of Kasemir, Kay
> Sent: Tuesday, July 09, 2013 12:06 PM
> To: tech-talk@aps.anl.gov
> Subject: Re: multiple servers on the same (loopback) interface
> 
> Hi:
> 
> The first IOC will serve on TCP port 5065.
> The second one can't do that, so you get the warning Configured TCP port
> was unavailable, ...Using dynamically assigned TCP port 34497.
> Both will try to listen to UDP search requests on the same port, then reply
> with the TCP port that they actually use, so all should be fine.
> 
> BUT: Because of a quirk in most network kernels only one of them will
> actually see those UDP search requests. For me it's usually the IOC started
> _last_.
> 
> If you want your clients to send search requests to all IOCs that are listening
> on the UDP port, you need to send a broadcast. Search requests sent to a
> specific IP address will only reach one of the IOCs listening on that IP.
> 
> You can try setting the EPICS_CA_ADDR_LIST=255.255.255.255.
> With localhost, that may not be possible, so you'll have to setup some
> network interface, maybe leave it disconnected, but it must have an IP
> address and most important a broadcast address.
> 
> -Kay
> 
> 
> 
> 
> 
> On Jul 9, 2013, at 1:50 PM, Jameson Graef Rollins <jrollins@ligo.caltech.edu>
> wrote:
> > Hey, folks.  I'm trying to run multiple IOCs on the same host and
> > network interface and I'm looking for tips to help get it working
> > cleanly.  I'm aware of some of the issues of servers sharing the same
> > interface [0].  However, I assume there must be a way to support this
> > situation, since I imagine it must be common.  But I'm having a lot of
> > trouble getting it to work.
> >
> > Some details that may or may not be relevant:
> > * I'm using the pcaspy python bindings.
> > * I'm trying to bind all of my servers to the loopback interface (I'm
> >   trying to put together a test infrastructure and this is required
> >   (afaik) for offline tests).
> >
> > I can start the first IOC no problem:
> >
> > 0$ EPICS_CAS_INTF_ADDR_LIST=localhost ./testioc.py TEST0:
> > prefix: TEST0:
> > db: {'FOO': {'prec': 0}}
> >
> > Client channel access works as expected:
> >
> > 0$ EPICS_CA_ADDR_LIST=localhost EPICS_CA_AUTO_ADDR_LIST=NO caget -
> t TEST0:FOO
> > 0
> > 0$
> >
> > When I start the second server I get the (expected) shared UDP warnings:
> >
> > 0$ EPICS_CAS_INTF_ADDR_LIST=localhost ./testioc.py TEST1:
> > cas warning: Configured TCP port was unavailable.
> > cas warning: Using dynamically assigned TCP port 34497,
> > cas warning: but now two or more servers share the same UDP port.
> > cas warning: Depending on your IP kernel this server may not be
> > cas warning: reachable with UDP unicast (a host's IP in
> EPICS_CA_ADDR_LIST)
> > prefix: TEST1:
> > db: {'FOO': {'prec': 0}}
> >
> > But unfortunately the first server is now no longer accessible:
> >
> > 0$ EPICS_CA_ADDR_LIST=localhost EPICS_CA_AUTO_ADDR_LIST=NO caget -
> t TEST1:FOO
> > 0
> > 0$ EPICS_CA_ADDR_LIST=localhost EPICS_CA_AUTO_ADDR_LIST=NO caget -
> t TEST0:FOO
> > Channel connect timed out: 'TEST0:FOO' not found.
> > 1$
> >
> > I've tried variously killing the caRepeater and accessing things in
> > different order, but nothing seems to work.  Things do work if I specify
> > different EPICS_CA_SERVER_PORT for the two servers, but that's an
> > inconvenience for the client since it has to know which record is being
> > served on which port.
> >
> > Does anyone have any suggestions on how to make this situation work?
> >
> > jamie.
> >
> > [0] http://www.aps.anl.gov/epics/base/R3-14/8-docs/CAref.html#Unicast
> 



References:
multiple servers on the same (loopback) interface Jameson Graef Rollins
Re: multiple servers on the same (loopback) interface Kasemir, Kay

Navigate by Date:
Prev: RE: multiple servers on the same (loopback) interface Jameson Graef Rollins
Next: RE: weird build Andrew C. Starritt
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: multiple servers on the same (loopback) interface D Peter Siddons
Next: Re: multiple servers on the same (loopback) interface Jameson Graef Rollins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·