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: CA server bind failure on Windows
From: Andrew Johnson <anj@aps.anl.gov>
To: <freddie.akeroyd@stfc.ac.uk>
Cc: tech-talk@aps.anl.gov
Date: Wed, 18 Jan 2017 12:24:25 -0600
Hi Freddie,

On 01/12/2017 12:04 PM, freddie.akeroyd@stfc.ac.uk wrote:
> I've had instances of both an IOC and a CAS being unable to create a
> channel access port. The servers attempt to bind to the usual channel
> access server port number, but rather than EADDRINUSE being returned
> on failure they are seeing EACCES.

Ralph suggested that we adopt a slightly more conservative approach to
fixing the issue, could you confirm this patch please.

Thanks,

- Andrew

-- 
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
=== modified file 'src/cas/io/bsdSocket/casIntfIO.cc'
--- src/cas/io/bsdSocket/casIntfIO.cc	2010-08-10 21:05:46 +0000
+++ src/cas/io/bsdSocket/casIntfIO.cc	2017-01-17 00:13:23 +0000
@@ -60,8 +60,9 @@
 	status = bind ( this->sock,
                       reinterpret_cast <sockaddr *> (&this->addr),
                       sizeof(this->addr) );
 	if (status<0) {
-		if (SOCKERRNO == SOCK_EADDRINUSE) {
+		if (SOCKERRNO == SOCK_EADDRINUSE ||
+		    SOCKERRNO == SOCK_EACCES) {
 			//
 			// enable assignment of a default port
 			// (so the getsockname() call below will

=== modified file 'src/libCom/osi/os/Darwin/osdSock.h'
--- src/libCom/osi/os/Darwin/osdSock.h	2016-05-22 03:43:09 +0000
+++ src/libCom/osi/os/Darwin/osdSock.h	2017-01-18 17:09:52 +0000
@@ -38,6 +38,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/Linux/osdSock.h'
--- src/libCom/osi/os/Linux/osdSock.h	2011-09-09 22:14:35 +0000
+++ src/libCom/osi/os/Linux/osdSock.h	2017-01-18 17:10:40 +0000
@@ -53,6 +53,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/RTEMS/osdSock.h'
--- src/libCom/osi/os/RTEMS/osdSock.h	2016-05-22 03:43:09 +0000
+++ src/libCom/osi/os/RTEMS/osdSock.h	2017-01-18 17:10:44 +0000
@@ -49,6 +49,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/WIN32/osdSock.h'
--- src/libCom/osi/os/WIN32/osdSock.h	2011-09-09 22:14:35 +0000
+++ src/libCom/osi/os/WIN32/osdSock.h	2017-01-18 17:22:44 +0000
@@ -48,6 +48,7 @@
 #define SOCK_ENOBUFS WSAENOBUFS
 #define SOCK_ECONNRESET WSAECONNRESET
 #define SOCK_ETIMEDOUT WSAETIMEDOUT
+#define SOCK_EACCES WSAEACCES
 #define SOCK_EADDRINUSE WSAEADDRINUSE
 #define SOCK_ECONNREFUSED WSAECONNREFUSED
 #define SOCK_ECONNABORTED WSAECONNABORTED

=== modified file 'src/libCom/osi/os/cygwin32/osdSock.h'
--- src/libCom/osi/os/cygwin32/osdSock.h	2015-04-29 19:01:07 +0000
+++ src/libCom/osi/os/cygwin32/osdSock.h	2017-01-18 17:09:37 +0000
@@ -49,6 +49,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/freebsd/osdSock.h'
--- src/libCom/osi/os/freebsd/osdSock.h	2011-09-09 22:14:35 +0000
+++ src/libCom/osi/os/freebsd/osdSock.h	2017-01-18 17:10:32 +0000
@@ -43,6 +43,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/iOS/osdSock.h'
--- src/libCom/osi/os/iOS/osdSock.h	2016-05-22 03:43:09 +0000
+++ src/libCom/osi/os/iOS/osdSock.h	2017-01-18 17:10:37 +0000
@@ -39,6 +39,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/solaris/osdSock.h'
--- src/libCom/osi/os/solaris/osdSock.h	2011-09-09 22:14:35 +0000
+++ src/libCom/osi/os/solaris/osdSock.h	2017-01-18 17:22:37 +0000
@@ -51,6 +51,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/libCom/osi/os/vxWorks/osdSock.h'
--- src/libCom/osi/os/vxWorks/osdSock.h	2011-09-09 22:14:35 +0000
+++ src/libCom/osi/os/vxWorks/osdSock.h	2017-01-18 17:22:40 +0000
@@ -72,6 +72,7 @@
 #define SOCK_ENOBUFS ENOBUFS
 #define SOCK_ECONNRESET ECONNRESET
 #define SOCK_ETIMEDOUT ETIMEDOUT
+#define SOCK_EACCES EACCES
 #define SOCK_EADDRINUSE EADDRINUSE
 #define SOCK_ECONNREFUSED ECONNREFUSED
 #define SOCK_ECONNABORTED ECONNABORTED

=== modified file 'src/rsrv/caservertask.c'
--- src/rsrv/caservertask.c	2016-05-22 03:43:09 +0000
+++ src/rsrv/caservertask.c	2017-01-17 00:13:24 +0000
@@ -106,7 +106,8 @@
     /* get server's Internet address */
     status = bind ( IOC_sock, (struct sockaddr *) &serverAddr, sizeof ( serverAddr ) );
 	if ( status < 0 ) {
-		if ( SOCKERRNO == SOCK_EADDRINUSE ) {
+		if ( SOCKERRNO == SOCK_EADDRINUSE ||
+		     SOCKERRNO == SOCK_EACCES ) {
 			/*
 			 * enable assignment of a default port
 			 * (so the getsockname() call below will


Replies:
RE: CA server bind failure on Windows freddie.akeroyd
References:
CA server bind failure on Windows freddie.akeroyd

Navigate by Date:
Prev: Re: Question about EDM installing on Fedora20-64bit operation system----cannot find -lXtst problem Gabriel de Souza Fedel
Next: Problem NFS mounting Centos 7 file systems from vxWorks 5.5 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
Navigate by Thread:
Prev: Re: CA server bind failure on Windows Benjamin Franksen
Next: RE: CA server bind failure on Windows freddie.akeroyd
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, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·