LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket error when network cable unplugged

Hi,

I'm having problems with my datasockets.  I have applications running on multiple computers, which publish data to a datasocket on the localhost.  Whenever we unplug a network cable, or the network goes down, the datasocket write function reports the following error code:  -2147014843 in Datasocket Write.

I can't find any information about this datasocket error code.  Can anyone give me advice on how to find more information about this error code?
The result is that whenever there is a network issue, we need to go and resolve it, then we need to log onto each computer (25+) to get the datasockets working again.

Also interesting to note is this problem has only presented itself since upgrading the computers from NT to Win2k & WinXP.

Thanks for any help that can be given.
Slade Squire
0 Kudos
Message 1 of 4
(3,665 Views)
Since the write operation cannot be performed when the network is down,  it's not surprising that an error arises on the Datasocket function. The developer needs to handle this error properly.
A search on msdn.microsoft.com reveals that this error (80072745 in hex format) is a network error (8007); by stripping the remaining part (2745) and converting it to decimal (10053) we get the corresponding Windows socket error code, see http://msdn2.microsoft.com/en-us/library/ms740668.aspx for (not many) details.
You can also have a description of network related error by typing in a console box      net helpmsg xxxxx      , where xxxxx is the decimal error (e.g. 100053).
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 4
(3,657 Views)
Thank you for such a prompt reply.

I had started to draw to the conclusion that it was a Windows networking error.  My belief is that the reason we never saw this error before is because NT keeps its IP address when the network drops out, whereas XP & 2000 discard the network settings.  I had no idea, however, on where to look up details, and was waiting for an NT machine to become available to test this.

Now, all I need to do is figure out a way to check if the network is operational before writing to the socket each time.

Thanks & Regards,
Slade Squire
0 Kudos
Message 3 of 4
(3,655 Views)
Hi again,

Just in case anybody else looks here, and have a similar problem...

The error code we saw was related to the networking functions of Windows.  In particular, the reason we did not see this problem in Windows NT, but it started appearing in 2000/XP, is the media sense functionality of Windows 2000/XP.  In 2000/XP, if there is no connection detected, the OS dumps the IP stack, and with it, the IP address.  As a result, when we try to write to a datasocket on the computers IP address, Windows returns an error, since there is no IP address anymore.

To resolve this issue, we turned off Media Sense on the affected computers.  We followed the instructions on this page:
http://www.windowsnetworking.com/articles_tutorials/Disable-Media-Sense-TCPIP-Windows-XP.html

Now, when the network drops out, we keep the same IP address, and so the datasocket can continue to write to the local computer, without any problems.

Regards,
Slade Squire



Message 4 of 4
(3,633 Views)