Why tcp closed by peer when trying to read msg after the successful Listen?

Hi everyone,
I had trouble to read data after Listen function return a good connection ID. The embedded application is running in ARM processor and I build a PC application with Labview to read the device status via TCP connecion. There are required two TCP connections between embedded application and PC application with specific port to listen on each side. After exchange port number by UDP message, both sides know the destination port to send msg. I can send request to embedded apllication in one TCP connection then listen to other TCP connection for reply. By monitroing the traffic of network card, I can see the successful TCP open sequence and in coming reply data, but Labview application shows error 66 "network connection closed by peer" when trying to read data, which is quite strange. I already see those data with network monitor tool, such as wire shark.
Did anybody experience the similar problem? and provide some suggestion? Is it problem of configuration of Labview? windows XP? I am using Labview 6.1.
Thanks
Lei
Solved!
Go to Solution.

LeiJ wrote:
Thanks Mike,
The problem was solved. It is timing issue. There is another while loop in code which sends heartbeat UDP message regularly for ervry 10 seconds, and this cause the problem of TCP read function. If I stop or remove this thread of while loop, the read function works fine. The UDP heartbeat message is only need to use once at first beginning to broadcast port number when setup TCP connection. Possibly I can send the heartbeat somewhere esle. I think the TCP error code 56 (timeout) and 66 (network connection closed by peer) is not distinguished in TCP read function. Thank you for reply and suggestion.
Regards
Lei
Actually LabVIEW distinguish between these errors very specifically. If you get an error 66 the connection was closed for sure, either explicitedly by the peer of implicitedly by the TCP IP stack after loosing the connection for to long such as when the Ethernet card would be disabled.
The issue most likely is that your client after sending back an open-package expects a specific response in a specific amount of time and closes the connection down if it does not get a valid response. Seems like a good measure to try to minimize the resources on your embedded target that need to be allocated when a badly behaving client is looping in a connection attempt.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Why does idisc quit unexpectedly when trying to burn a disk?

    Why does idisc quit unexpectedly when trying to burn a disk?

    Since iDisk is an online service for keeping your data and has nothing to do with burning CDs or DVDs, you must be thinking of something else. What application are you using to burn? the Finder? iTunes? iDVD? Toast? Or something else?
    Is there an error message that appears when this occurs?
    Let us know, we'll keep working with you.

  • Why is Lightroom 5 hanging when trying to export images?

    Why is Lightroom 5 hanging when trying to export images?

    I've been having the same issues, mainly with videos.  Any resolution to your issue yet?

  • Why do i keep getting this message when trying to view a movie: The shared library "iCloud Purchases" is not accepting connections at this time. Please try again later.

    why do i keep getting this message when trying to view a movie: The shared library “iCloud Purchases” is not accepting connections at this time. Please try again later.

    Same issue. What are they doing?
    Macbook Pro Retina Yosemite 10.10.2

  • Connection reset by peer when trying to update to OSX server 3.01 on 10.9

    connection reset by peer when trying to update to OSX server 3.01 on 10.9. PLease help

    Assuming your network is working for other activities, and it's just the Mac App Store that's failing...
    Try restarting the download within the Mac App Store. 
    Failing that, restart Mac App Store and try restarting the download again.
    Then failing all that, I'd close Mac App Store, reboot the system, and open and try the Mac App Store download again. 
    Here are some details on the Mac App Store (including how to cancel and restart downloads), and here are the App Store Troubleshooting suggestions from Apple.

  • I keep getting the message "An unknown error has occurred" when trying to sign in to the App Store. Why?

    I keep getting the message "An unknown error has occurred" when trying to sign in to the App Store. How do I solve this problem?

    Make sure you have the correct country selected. Click the round flag icon bottom right side of the App Store window.

  • Remote Desktop Crashes When trying to log-in after changing password on the remote computer

    Hi.
    I use cisco VPN to connect to my work computer.
    I can use RDC to connect to any computer on home network without issue. 
    Yesterday I changed to password on my work computer and now every time I try to log from my home computer RDC crashes.
    I've disabled printing/clipboard on local devices and resourses, and I've deleted all the RDC cache files on the computer but I continue to have the same issues. 
    please help
    Faulting application name: mstsc.exe, version: 6.1.7601.18540, time stamp: 0x53c72529
    Faulting module name: ntdll.dll, version: 6.1.7601.18798, time stamp: 0x5507b864
    Exception code: 0xc0000374
    Fault offset: 0x00000000000bf922
    Faulting process id: 0x44c
    Faulting application start time: 0x01d078d866a9ba25
    Faulting application path: C:\Windows\system32\mstsc.exe
    Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
    Report Id: 65a988c9-e4cc-11e4-8a77-f46d04eedf8b
    http://answers.microsoft.com/en-us/windows/forum/windows_7-winapps/remote-desktop-crashes-when-trying-to-log-in-after/cc45b7be-62ee-4f83-b50b-db028ee32a7f

    Hi hg,
    I didn’t found relevant settings in remote desktop connection manager, I checked the “Use multiple monitors when necessary” under tools->options, but seems like it is used for span a full screen over multiple monitors. For now I’d suggest figuring out
    why your remote session keeps crushing.
    I suspect the crash is not related to password changing, similar cases normally occurs after some local device driver, please try to disable the local printer in Remote desktop connection local resources first.
    Regards,
    D. Wu
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Error ORA-12560 prompts when trying to log in to the Enterprise Manager

    Hi all,
    I am a newbie to Oracle.
    Just installed the Oracle 9i Database Enterprise Edition (9.0.1) into Windows Server 2003 Standard Edition. Problem is encountered when trying to log in to the Enterprise Manager Standalone mode using either system/oracle or scott/tiger as credentials. Error "ORA-12560: TNS:protocol adapter error" prompts.
    I tried to check with some configuration and see whether the services are started. Services of "OracleOraHome90TNSListener" and "OracleServiceORCL" have been started and the database exists in the dedicated directory. Environment variables of "ORACLE_HOME" and "ORACLE_SID" have been added manually as the SID is set to orcl, which I just follow what the instruction manual has stated. Moreover, I can't get access using command prompt typing "svrmgrl"; error returned stating " 'svrmgrl' is not recognized as an internal or external command, operable program or batch file."
    Another information is that there is no domain set in my server. Just a server with a name being assigned in a workgroup.
    Hence, would you mind please advice me what to do in order to get access into the Enterprise Manager? It's quite an urgent task.
    A million thx in advance!
    Best Regards,
    Karen

    Hi Jigneshrp,
    Thanks for your reply.
    It is checked that the listener is running and TNS name service exists. Following your advice, I did create a new listener and another name service and use them, but the same error turns out when trying to log in to the Enterprise Manager again.
    Additional information to take note for is that while reconfiguring the existing listener or creating a new listener, a mesage prompts stating "The information provided for this listener is currently in use by other software on this computer. You can proceed with the configuration as it is, but it will not be possible to start this listener until the conflict is resolved. Would you like to continue with the continue with the configuration anyway? Yes/No".
    As for the reconfiguration or the new creation of TNS names service, when I am trying to test for the connection, the results in the details pane states that "Connecting... ORA-12560: TNS:protocol adapter error. The test did not succeed...."
    Would you mind pls advice me on these?
    Furthermore, there exist 2 questions I am wondering is that it is stated in the instruction manual that prior to the installation, a static IP should be specified for it instead of the DHCP one; hence, I wanna ask after the complete insallation, is it that the server should be running in the network, i.e. allow it to get connected with the outside network?
    2nd question is that can Oracle 9i Database Server Standard Edition (9.0.1) be installed under a Windows Server 2003 Standard Edition and just a Window XP Professional?
    Thanks for your reply.
    Best Regards,
    Karen

  • When trying to log on to the iTunes store I get the message 'We could not complete your iTunes store request. The network connection was reset'.

    When trying to log on to the iTunes store I get the message 'We could not complete your iTunes store request. The network connection was reset'.  I can access my account on a different PC but not my own.  Can you advise me as to what I should do please?

    Hello donnafromwakefield,
    The article linked below details steps that can help restore your computer's ability to connect to the iTunes Store.
    Can't connect to the iTunes Store
    http://support.apple.com/en-us/TS1368
    Cheers,
    Allen

  • Error message when trying to read ebook E_AUTH_BAD_DEVICE_KEY_OR_PKCS12

    has anyone had this happen, error message when trying to read ebook E_AUTH_BAD_DEVICE_KEY_OR_PKCS12

    deauthorize (shift-ctrl-d) and then restart ade.  you will be prompted to re-authorize.

  • Why metadata index shows up when i plug my ipod into the computer in itunes and how to avoid metadata index showing up it will not allow me to eject from itunes

    why metadata index shows up when i plug my ipod into the computer  in itunes and it will not allow me to eject my ipod from itunes

    Hi donfrommars,
    Welcome to the Apple Support Communities!
    Please use the following article for information and instruction on deleting the U2 album from your devices and account.
    Remove iTunes gift album "Songs of Innocence" from your iTunes music library and purchases
    Have a great day,
    Joe

  • 2nd gen A TV I can hear but not see on the TV when trying to stream TV from the iPad2

    2nd Gen ATV I can hear but not see on the TV when trying to stream TV from the iPad2

    You can look at the ipad under settings, general, about and see if it's 4.3.3.
    Or when you connect the ipad to the computer with itunes, it'll tell you on the first tab if you need an update.

  • Windows 7 crashed after Creative Suite 6 Design and Web Premium completed an update. The only Windows restore point that worked was pre-installation of CS6 software. Now when trying to reinstall I get the 'installer failed to initialize' message. Have tri

    Windows 7 crashed after Creative Suite 6 Design and Web Premium completed an update. The only Windows restore point that worked was pre-installation of CS6 software. Now when trying to reinstall I get the 'installer failed to initialize' message. Have tried using the CC Cleaner Tool but nothing works? Any solution please. Was new computer and newly purchased CS6 software downloaded 2 days prior to the upgrade.

    make sure you follow all the steps here, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • YOUR Message "There is a problem with Adobe Acrobat/Reader. If it is running, please exit and try again. (0:104)" keeps occuring when trying to read.

    YOUR Message "There is a problem with Adobe Acrobat/Reader. If it is running, please exit and try again. (0:104)" keeps occuring when trying to read.

    Hi tanjam38435898,
    Please refer this thread Links as it seems relevant to your query : Re: Error Code 0:104
    hope that helps
    Regards,
    Rahul

  • I recently upgraded to Mac OS X.  I hadn't try to access anything in iWorks 09 since the upgrade, until now.  I get an error message when trying to open any of the iWorks 09 applications.  What's the fix for this?

    I recently upgraded to Mac OS X.  I haven't tried to access anything in iWorks 09 since the upgrade, until now.  I get an error message when trying to open any of the iWorks 09 applications.  What's the fix for this?

    Follow Sonicray's advice and when you post try to give as much info about your Mac, your OS, etc... Fill out your Profile info.

Maybe you are looking for

  • Missing driver for co-processor of my hp pavillion dv6000

    Hello Mr DavidPK. I saw a similar problem dat i am having with my 3 missing device drivers : 2 base system device and 1 co-processor. but my problem now is with my co-processor driver. Here is my P#: KN050EA#ABU. This problem started when i upgraded

  • Lost indesign file please help

    Hi guys, last night I was working on some coursework, I had just done saves throughout the night multiple times to the same name as ''Design.indd'' on my desktop. I then plugged in my HDD. I then right click ''save as'' and then went over my design.i

  • Why are the fonts so blurry on iMac 27 in OsX?

    I just got a new iMac 27, my first Apple desktop. And I'm sorely disappointed with how fonts look. Sort of clumpy and blurry, as if they are mismatched to the resolution of the screen. I tried a number of sizes, fonts, apps, browsers (Safari and Chro

  • How to enhance the Opportunities search help in UI

    Hi all I have a requirement wherein I need to enhance the Standard Search help of  Opportunities in UI. The requirement is, we have few custom fields and few fields from 'Milestone' tab .These fields needs to show it in the initial screen of 'Opportu

  • How to see vendor stock at Key Date

    Hi SAP Buddies Please can u tell me how to check the vendor stock at any specific or key date. Thanks in advance Brijesh Verma Edited by: Brijesh Verma on Nov 14, 2008 12:44 PM