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  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Asyn not automatically reconnecting
From: Mark Rivers <[email protected]>
To: "'Daykin, Evan'" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 27 Feb 2018 19:38:43 +0000
> Is it possible asyn is [un]intentionally not retrying the connection if it is closed gracefully?

In my tests the TCP server was running in another EPICS IOC, and I killed the server by typing "exit" at the IOC prompt.  It exited without a seg fault or other crash, so I think it closed the socket gracefully.  The IOC running StreamDevice immediately knew that the connection had been closed, without any retries, etc.  

This is the TCP server IOC running the echo server.

epics> exit
2018/02/27 13:29:41.281 echoListener: write error on: P5001:0: localhost:5001 disconnected:

This is the IOC running StreamDevice.  So it realizes the connection has been closed in under 1 second.

2018/02/27 13:29:42.259 corvette.cars.aps.anl.gov:5001 read 0
2018/02/27 13:29:42.259 Close corvette.cars.aps.anl.gov:5001 connection (fd 6): Read from broken connection
2018/02/27 13:29:42.259 13TEST:asyn1: exception 0, asynExceptionConnect
2018/02/27 13:29:42.259 ECHO read
2018/02/27 13:29:42.259 corvette.cars.aps.anl.gov:5001 write.
2018/02/27 13:29:42.259 corvette.cars.aps.anl.gov:5001 write 7
Hello\r\n
2018/02/27 13:29:42.259261 ECHO 13TEST:R:testOut: write failed because connection was closed by device
2018/02/27 13:29:42.264 ECHO addr -1 queueRequest priority 3 not lockHolder
2018/02/27 13:29:42.264 asynManager connect queueCallback port:ECHO
2018/02/27 13:29:42.264 Open connection to corvette.cars.aps.anl.gov:5001  reason:0  fd:-1

When the server IOC came back up it reconnected quickly.

Mark

> -----Original Message-----
> From: Daykin, Evan [mailto:[email protected]]
> Sent: Tuesday, February 27, 2018 12:18 PM
> To: Mark Rivers <[email protected]>
> Cc: [email protected]
> Subject: RE: Asyn not automatically reconnecting
> 
> 
> Here's something interesting: asyn behaves correctly for us *only* when the client
> application is killed with SIGKILL, rather than SIGTERM. This results in TCP
> retransmissions and/or refused connections, then normal operation after a short while.  Is it
> possible asyn is [un]intentionally not retrying the connection if it is closed gracefully?

References:
Asyn not automatically reconnecting Daykin, Evan
RE: Asyn not automatically reconnecting Daykin, Evan
RE: Asyn not automatically reconnecting Daykin, Evan
RE: Asyn not automatically reconnecting Daykin, Evan
RE: Asyn not automatically reconnecting Daykin, Evan
RE: Asyn not automatically reconnecting Daykin, Evan

Navigate by Date:
Prev: Re: Idea for new Display Manager Mooney, Tim M.
Next: Re: Idea for new Display Manager Wang Xiaoqiang (PSI)
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Asyn not automatically reconnecting Daykin, Evan
Next: RE: Asyn not automatically reconnecting Mark Rivers
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 02 Mar 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·