> "<IPA>" means there is (yet another) error message buffer which is too small...
This is the problem buffer.
diff --git a/src/remote/blockingUDPConnector.cpp b/src/remote/blockingUDPConnector.cpp
index 3553b33..fcf633c 100644
--- a/src/remote/blockingUDPConnector.cpp
+++ b/src/remote/blockingUDPConnector.cpp
@@ -73,7 +73,7 @@ BlockingUDPTransport::shared_pointer BlockingUDPConnector::connect(ResponseHandl
retval = ::bind(socket, (sockaddr*)&(bindAddress.sa), sizeof(sockaddr));
if(retval<0) {
- char ip[20];
+ char ip[64];
sockAddrToDottedIP((sockaddr*)&(bindAddress.sa), ip, sizeof(ip));
char errStr[64];
epicsSocketConvertErrnoToString(errStr, sizeof(errStr));
Changing 20 to 64 fixes the output.
Previously:
2019-03-14T10:54:07.443 Error binding socket <IPA>: S_errno_EADDRINUSE.
Now:
2020-01-12T17:37:28.129 Error binding socket 164.54.160.151:5076: S_errno_EADDRINUSE.
Mark
________________________________
From: Core-talk <[email protected]> on behalf of Mark Rivers via Core-talk <[email protected]>
Sent: Sunday, January 12, 2020 11:19 AM
To: Michael Davidsaver
Cc: [email protected]
Subject: Re: Error message binding socket 5076 on vxWorks
> Do you think this a regression against an earlier version of the pvAccessCPP module on these IOCs?
> Any other upgrades recently (vxWorks)?
All IOCs are current running 7.0.3.1. My logs only go back about a year, when I was running 7.0.2. The "Error binding" error also happened in 7.0.2.
I have not upgraded vxWorks for several years.
> "<IPA>" means there is (yet another) error message buffer which is too small...
Ahh, that makes sense. I think it is too small by 1 character in this case. The two IOCs that print <IPA> are these:
ioc13idd.cars.aps.anl.gov has address 164.54.160.103
ioc13bmc.cars.aps.anl.gov has address 164.54.160.151
Note that their 4'th octet is greater than 99, i.e. 3 digits long. The ones that don't print <IPA> are less 100 so they are only 2 digits.
> Can you try running 'inetstatShow' before 'iocInit()'?
This is inetstatShow immediately before the call to iocInit. Nothing about port 5076.
inetstatShow
INET sockets
Prot Recv-Q Send-Q Local Address Foreign Address State
TCP 0 0 0.0.0.0.23 0.0.0.0.* LISTEN
TCP 0 0 0.0.0.0.111 0.0.0.0.* LISTEN
UDP 0 0 127.0.0.1.20005 127.0.0.1.20004
UDP 0 0 0.0.0.0.123 0.0.0.0.*
UDP 0 0 127.0.0.1.20045 127.0.0.1.20044
UDP 0 0 0.0.0.0.111 0.0.0.0.*
UDP 0 0 0.0.0.0.989 0.0.0.0.*
INET6 sockets
Prot Recv-Q Send-Q Local Address Foreign Address State
> When combined with a lack of coordination within the implementations, each process with both a PVA client and server will always bind twice to 5076.
Is that is what is causing the "Error binding" message? What PVA client would they be running. They are running the PVA server in base 7, including qsrv.
Thanks,
Mark
________________________________
From: Michael Davidsaver <[email protected]>
Sent: Sunday, January 12, 2020 10:41 AM
To: Mark Rivers
Cc: [email protected]
Subject: Re: Error message binding socket 5076 on vxWorks
On 1/12/20 5:57 AM, Mark Rivers wrote:
>
>> There is already a socket bound to UDP 5076 which is not a PVA server/client (which should share w/ SO_REUSEADDR).
>
> Yes, but why?
>
> This happens on all vxWorks IOCs, and only on vxWorks IOCs. I don't know of anything I am doing that would be creating a socket bound to that port.
Can you try running 'inetstatShow' before 'iocInit()'?
> On 2 systems the message says <IPA> rather than 164.54.160.xxx.
Do you think this a regression against an earlier version of the pvAccessCPP module on these IOCs?
Any other upgrades recently (vxWorks)?
> 13BMA.log:Wed Jan 23 15:20:23 20192019-01-23T15:20:23.891 Error binding socket 164.54.160.74:5076: S_errno_EADDRINUSE.
> 13BMC.log:Thu Mar 14 10:54:07 20192019-03-14T10:54:07.443 Error binding socket <IPA>: S_errno_EADDRINUSE.
"<IPA>" means there is (yet another) error message buffer which is too small...
> 13BMD.log:Thu Jan 2 11:55:09 20202020-01-02T17:55:09.970 Error binding socket 164.54.160.95:5076: S_errno_EADDRINUSE.
> 13IDA.log:Thu Jan 10 11:33:39 20192019-01-10T11:33:39.369 Error binding socket 164.54.160.75:5076: S_errno_EADDRINUSE.
> 13IDC.log:Thu Jan 2 11:13:46 20202020-01-02T17:13:46.898 Error binding socket 164.54.160.94:5076: S_errno_EADDRINUSE.
> 13IDD.log:Tue Mar 26 13:47:59 20192019-03-26T13:47:59.664 Error binding socket <IPA>: S_errno_EADDRINUSE.
> 13IDE.log:Sat Jan 26 14:42:21 20192019-01-26T14:42:21.834 Error binding socket 164.54.160.99:5076: S_errno_EADDRINUSE.
>
> This is the output of inetstatShow on 164.54.160.75.
... omitting (I think) unrelated bits
> These are the UDP sockets on port 5076 from the above list:
> UDP 0 0 164.54.160.75.5076 0.0.0.0.*
> UDP 0 0 164.54.160.255.5076 0.0.0.0.*
> UDP 0 0 224.0.0.128.5076 0.0.0.0.*
> UDP 0 0 224.0.0.128.5076 0.0.0.0.*
>
> The 224.0.0.128 addresses are multicast? Is this used by PVA?
Yes. PVA uses UDP ports differently than CA (imo. for no good reason).
With CA, servers use UDP 5065 for beacons, and clients use UDP 5064 for searches.
With PVA, both clients and servers use UDP 5076 for beacons and searches.
When combined with a lack of coordination within the implementations,
each process with both a PVA client and server will always bind twice to 5076.
The use of multicast is a trick to enable unicast searches/beacons
to work in this environment.
- References:
- Error message binding socket 5076 on vxWorks Mark Rivers via Core-talk
- Re: Error message binding socket 5076 on vxWorks Michael Davidsaver via Core-talk
- Re: Error message binding socket 5076 on vxWorks Mark Rivers via Core-talk
- Re: Error message binding socket 5076 on vxWorks Michael Davidsaver via Core-talk
- Re: Error message binding socket 5076 on vxWorks Mark Rivers via Core-talk
- Navigate by Date:
- Prev:
Re: Error message binding socket 5076 on vxWorks Mark Rivers via Core-talk
- Next:
Re: Error message binding socket 5076 on vxWorks Michael Davidsaver via Core-talk
- Index:
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:
Re: Error message binding socket 5076 on vxWorks Mark Rivers via Core-talk
- Next:
Re: Error message binding socket 5076 on vxWorks Michael Davidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|