EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: CA error #2 and #48
From: [email protected] (Jeff Hill)
To: <[email protected]>, "tech-talk" <[email protected]>
Date: Tue, 22 Feb 2000 13:12:42 -0700
Geoff,

The second part of the message which is varying between "No such file or directory",
and "Address already in use" is generated directly from the socket library errno
in the client process. These messages directly map to socket library error numbers
2 and 48 respectively. Sometimes there are problems because CA has accessed
some other function in the C run time library in-between the spot in the source
code where the problem occurred and where CA reports the error, and therefore
the errno variable might be overwritten. In this situation I don't see this mechanism 
in play. Without knowing more about which operating system you are running on or
what version of EPICS is running it is difficult to comment further.

Jeff

PS: I have attached the source code that is involved.

		status = connect(	
				piiu->sock_chan,
				&pNode->destAddr.sa,
				sizeof(pNode->destAddr.sa));
		if (status == 0) {
			break;
		}

		errnoCpy = SOCKERRNO;
		if (errnoCpy==SOCK_EISCONN) {
			/*
			 * called connect after we are already connected 
			 * (this appears to be how they provide 
			 * connect completion notification)
			 */
			break;
		}
		else if (
			errnoCpy==SOCK_EINPROGRESS ||
			errnoCpy==SOCK_EWOULDBLOCK /* for WINSOCK */
			) {
			/*
			 * The  socket  is   non-blocking   and   a
			 * connection attempt has been initiated,
			 * but not completed.
			 */
			UNLOCK;
			return;
		}
		else if (errnoCpy==SOCK_EALREADY) {
			UNLOCK;
			return;	
		}
#ifdef _WIN32
		/*
		 * including this with vxWorks appears to
		 * cause trouble
		 */
		else if (errnoCpy==SOCK_EINVAL) { /* a SOCK_EALREADY alias used by early WINSOCK */
			UNLOCK;
			return;	
		}
#endif
		else if(errnoCpy==SOCK_EINTR) {
			/*
			 * restart the system call if interrupted
			 */
			continue;
		}
		else {	
			TAG_CONN_DOWN(piiu);
			UNLOCK;
			ca_printf(
	"CAC: Unable to connect port %d on \"%s\" because %d=\"%s\"\n", 
				ntohs(pNode->destAddr.in.sin_port), 
				piiu->host_name_str, errnoCpy, 
				SOCKERRSTR);
			return;
		}

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Tuesday, February 22, 2000 12:51 PM
> To: tech-talk
> Subject: CA error #2 and #48
> 
> 
> Hi,
> 
> Would someone please explain when CA feels it should spit out these
> error messages.
> 
> ..................................................................
> CAC: Unable to connect port 5064 on "d0olctl03.fnal.gov:5064" because
> 2="No such file or directory"
> CA.Client.Diagnostic..............................................
>     Message: "Network connection lost"
>     Severity: "Warning" Context: "d0olctl03.fnal.gov:5064"
>     Source File: ../iocinf.c Line Number: 1479
> ..................................................................
> 
> 
> ..................................................................
> CAC: Unable to connect port 5064 on "d0olctl03.fnal.gov:5064" because
> 48="Address already in use"
> CA.Client.Diagnostic..............................................
>     Message: "Network connection lost"
>     Severity: "Warning" Context: "d0olctl03.fnal.gov:5064"
>     Source File: ../iocinf.c Line Number: 1479
> ..................................................................
> 
> Thanks
> 
> Geoff
> 


Replies:
Re: CA error #2 and #48 Geoff Savage
References:
CA error #2 and #48 Geoff Savage

Navigate by Date:
Prev: Re: Problems with messages... Maren Purves
Next: Re: Problems with messages... Pete R. Jemian
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: CA error #2 and #48 Geoff Savage
Next: Re: CA error #2 and #48 Geoff Savage
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·