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

Subject: Re: PCAS (using pcaspy) in docker ""server isnt attached to a network"
From: Andrew Johnson <anj@aps.anl.gov>
To: "Sparger, John E." <spargerje@ornl.gov>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 30 Mar 2017 15:08:47 -0500
Hi John,

Do you know which version of the Base libraries you are using, both for
pcasPy and for the soft IOC? I know we made some changes to the network
interface code recently, and you might find that if you can get pcasPy
to use the latest Base-3.15.5 versions of the libraries the behaviour
might be different. I can't promise it will fix it, but it would be
helpful to know.

One thing I did notice in your ifconfig output, the broadcast inet
address for your container has not been set; configuring that might make
a difference (it's worth trying at least).

- Andrew

On 03/30/2017 11:58 AM, Sparger, John E. wrote:
> Hi,
> 
>  
> 
> If I try to run pcaspy in docker, I get the following error in CAS:
> 
>  
> 
> ```
> 
> filename="../../../../src/cas/io/bsdSocket/casDGIntfIO.cc" line number=121
> 
> server isnt attached to a network - unable to continue
> 
> filename="../../../../src/cas/io/bsdSocket/caServerIO.cc" line number=116
> 
> Attempt to set server's IP address/port failed unable to attach explicit
> interface
> 
> filename="../../../../src/cas/generic/caServerI.cc" line number=59
> 
> server isnt attached to a network - CA server internals init unable to
> continue
> 
> terminate called after throwing an instance of 'int'
> 
> ```
> 
>  
> 
> I understand that this has something to do with CAS's interface
> detection. However, if I run `softIOC` with the following db
> 
>  
> 
> ```
> 
> echo "record(ai,"test_pv") {
> 
> field(VAL,"3")
> 
> }" > test.db
> 
>  
> 
> softIOC -d test.db
> 
> ```
> 
>  
> 
> It works fine and I can `caget testpv` from another container without
> issue. This leads me to believe that the plumbing is there but that
> there is some assumption made in how CAS detects broadcast interfaces
> that is not holding true in docker.
> 
>  
> 
> Have you all been able to successfully run pcaspy  or cas-based servers
> in docker? Are there some environment variables I can set to help cas along?
> 
>  
> 
> I should note that setting `EPICS_CAS_INTF_ADDR_LIST="localhost"` WILL
> allow pcaspy will run in docker, but then the PVs are not visible
> outside that docker container, so it's not that useful.
> 
>  
> 
> Also for reference, here is what ifconfig returns from inside the container:
> 
>  
> 
> ```
> 
> ifconfig
> 
> eth0      Link encap:Ethernet  HWaddr 02:42:ac:11:00:02 
> 
>           inet addr:172.17.0.2  Bcast:0.0.0.0  Mask:255.255.0.0
> 
>           inet6 addr: fe80::42:acff:fe11:2/64 Scope:Link
> 
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> 
>           RX packets:237 errors:0 dropped:0 overruns:0 frame:0
> 
>           TX packets:186 errors:0 dropped:0 overruns:0 carrier:0
> 
>           collisions:0 txqueuelen:0
> 
>           RX bytes:240235 (234.6 KiB)  TX bytes:11013 (10.7 KiB)
> 
>  
> 
> lo        Link encap:Local Loopback 
> 
>           inet addr:127.0.0.1  Mask:255.0.0.0
> 
>           inet6 addr: ::1/128 Scope:Host
> 
>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
> 
>           RX packets:3 errors:0 dropped:0 overruns:0 frame:0
> 
>           TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
> 
>           collisions:0 txqueuelen:1
> 
>           RX bytes:208 (208.0 B)  TX bytes:208 (208.0 B)
> 
> ```
> 
>  
> 
> Thanks for the help,
> 
>  
> 
> John Sparger
> 

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

Replies:
Re: PCAS (using pcaspy) in docker ""server isnt attached to a network" Sparger, John E.
References:
PCAS (using pcaspy) in docker ""server isnt attached to a network" Sparger, John E.

Navigate by Date:
Prev: Re: Question about PV name by using pcaspy Xiaoqiang Wang
Next: TcIoc tyse_ljw
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
Navigate by Thread:
Prev: PCAS (using pcaspy) in docker ""server isnt attached to a network" Sparger, John E.
Next: Re: PCAS (using pcaspy) in docker ""server isnt attached to a network" Sparger, John E.
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
ANJ, 31 Mar 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·