Tcp listen accepts multiple simultaneo​us connection​s even when closed

LV 6.0.2, win 2k
I am trying to set up a server that will recieve data from multiple clients. If I set up a TCP listen vi on the server, then I have found that any (or the same) client can open multiple connections on this port and send data to it even though the server has only called the TCP listen VI once and only has a reference for the first connection. The subsequent connections seem to be accumlating in the port buffer and the data can in fact be retrieved with subsequent calls to TCP listen on that port regardless of whether the client has closed the connection long ago and forgotten about the transaction.
This could perhaps be considered either a feature or a bug. For me it is undesirabl
e. I would prefer that attempted connections to the server were rejected if the server is not actually actively listening on the port. Otherwise clients can easily flood the port.
Is there some way to control this behaviour, or perhaps a completely different approach? or is there some way to control the port settings such as buffer size or max number of connections allowed, and a way to clear the buffer without processing all the connections?
Thanks in advance for any thoughts.

Thanks for the comments.
I don't seem to get the same behaviour you describe.
When you say 'if the server closes the connection after reading the first request, then it will not process the rest of the requests waiting in the queue'. I find that after the server closes the connection (with TCP close connection) then there can still be a huge backlog of connections to the same port (requests) which are still waiting to be processed. Another call to TCP listen retrieves one of the old ones, it doesn't wait around for a legitimately new request from a client.
Where you say 'When you leave the connection open on the server side, you can receive multiple commands this way, but it also blocks other clients from connecting until the curre
nt client disconnects'. This is in fact my main difficulty. Even with a connection held open other clients (or the same client) CAN make other connections and send data through that connection. This then backs up if the server is not processing them faster than recieving them.
I've attached vi's which should demonstrate the issue.
I couldn't check your vi's. I'm missing the EOC error.vi and one other I think. Ultimately I hope to do something similar with multiple open connections, but still need the server to be able to refuse connections if it wants to. Something I don't seem to be able to do. The connections just keep coming regardless of how the server is set up.
Thanks again.
Steve
Attachments:
server.vi ‏229 KB
client.vi ‏28 KB

Similar Messages

  • Every time I try and update my iphone 4 to ios 7.1 in iTunes 11.1.5 it says "connection reset" even when there is no problem with my connection

    I have an iPhone 4. I use iTunes 11.1.5 on my Mac. I am trying to update to ios 7.1 through iTunes, but every time I do that, I get a "connection reset" error, even when I know there has been no problem with my connection.
    The exact error message is as follows:
    "There was a problem downloading the software for the iPhone "Anne's iPhone". The network connection was reset.
    Make sure your network settings are correct and your network connection is active, or try again later."
    I have checked several times. There is no problem with the connection, and I have tried to download the software several times today.
    Any help you can give me would be appreciated.

    Just managed to successfully download the update, having retried five or six times. I did unplug my phone while the download was taking place (had asked iTunes to download only, not to update) -- suspect this had no bearing on it whatsoever, and that persistence is the only way here.

  • Constant "connecting msg", even when Mozilla is checking for updates. IE explorer is working while Mozilla fails.

    Mozilla getting constant "connecting" msg even while IE explorer is working with no problem. The Windows troubleshooter does not identify the problem. Mozilla version 30.0.5. Tried to uninstall with no success.

    ''lexdcs [[#question-1045958|said]]''
    <blockquote>
    Mozilla getting constant "connecting" msg even while IE explorer is working with no problem. The Windows troubleshooter does not identify the problem. Mozilla version 30.0.5. Tried to uninstall with no success.
    </blockquote>
    ''lexdcs [[#question-1045958|said]]''
    <blockquote>
    Mozilla getting constant "connecting" msg even while IE explorer is working with no problem. The Windows troubleshooter does not identify the problem. Mozilla version 30.0.5. Tried to uninstall with no success.
    </blockquote>
    Problem resolved now... disabled all add-ons and rebooted.

  • T530 multiple display configuration lead to errors when closing the laptop

    Hello,
    I have a Lenovo T530 2429CTT and I am having some trouble when trying to set up my multiple display configuration with a Lenovo ThinkPad Mini Dock Plus Series 3.
    I have an external Samsung LCD monitor which is connected to the Mini Dock via DisplayPort.
    I am running Win 7 Prof.
    The problem I see is with an application which uses DirectX. The display looks fine in the following configuration:
    - Laptop open
    - External Samsung LCD Monitor on
    - Display cloned so that both devices show my desktop
    The issues appear when I close the laptop. I do this because in my office I only work with the external monitor so I don't need the internal display of the laptop at that moment.
    When I close the laptop the following happens:
    The external display gets dark for some seconds. It comes up again, gets dark and after a while (maybe 10 sec) it stays active. Sometimes I see a notification that the color scheme has changed to Win 7 basic.
    Everything seems to be fine now but when looking at the DirectX based display of my application I have some problems for example with the refresh (the display looks very weird).
    BTW: The laptop has an internal and an external graphic card (Internal: Intel HD 4000, External: NVIDIA NVS 5400M).
    So it seems as when the laptop gets closed, the internal graphics will be turned off. Due to this the display on the external monitor also changes the settings of the graphhic card (maybe it gets turned in an energy saver state).
    I was looking at many of the NVIDIA settings without any success so hopefully somebody in this forum has an idea what is happening there.
    Thanks,
    Andreas

    Hi,
    I'm trying to buy the exact same configuration. 
    although i cannot find this 2429CTT on lenovo site anywhere, is available for selling on a known european supplier.
    and my propose is to have 2 Monitors connected, so I'll follow this inquire very closely and hold my order until then.
    do you have any update on it?
    just by curiosity, what about the rest? how does the PC feels to you? everything else is working?
    thanks

  • How to keep NetStream.Connect alive even when noone is connected?

    is there any timeout set for NetStream.Connect? I am having an issue when one streamer goes to 2way channel and waits for another party to join but after about 1 minute (if noone is receiving that streamer signal) the NetStream.Connect.Close event is fired up. I want to be able to wait little bit longer.
    Any help much appreciated.

    Dear Alll,
    Please help.

  • Getting an internet connection error even when the computer is obviously connected to the internet.

    I can't get my itunes to look for a software update for my phone or hit the itunes store.  Everytime I attempt it I get the following message:
    "iTunes Help is unavailable because your computer isn’t connected to the Internet.
    To view iTunes Help, make sure you’re connected to the Internet, then choose iTunes Help from the Help menu."
    Obviously, I am able to get on the internet as I am on it right now.  I cannot update my phone software to the new OS.  Can't get online to get media, etc.  Please help!

    Close your iTunes,
    Go to command Prompt -
    (Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
    (Win XP SP2 &amp; above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
    In the "Command Prompt" screen, type in
    netsh winsock reset
    Hit "ENTER" key
    Restart your computer.
    If you do get a prompt after restart windows to remap LSP, just click NO.
    Now launch your iTunes and see if it is working now.
    If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
    iTunes 10.5 for Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/TS4123?viewlocale=en_US

  • C7 - WLAN Connecting automatically, even when set ...

    Hi, my C7 always connects to the home WLAN even it is set to "Manual" and not switch to known WLANs..... I tried turning the widgets offline too.... but it always connects to the WLAN after a few seconds.
    This is annoying because when I want to use Joikuspot I have to be really fast to launch it before it connects and blocks the WLAN interface for joiku....

    I faced similar issues when using the built-in nokia web bowser and there are a couple of solutions you can try:
    1) when changing between wifi hotspots
         * make sure your access point is defined for that hotspot:
           menu>web (activate built-in browser)>options >settings>general>access point>options>
           select access point>select your wifi access point.
         *how to add modify access point:
          menu>settings>connectivity>settings>destinations>you can add/modify here
          the access poitn you selected should correspond to your wifi hotspot.
    2) if you have saved bookmarks in the built-in web browser, the last access point you used
        is probably saved as default, I always encounter this when I start yahoo.
       Here is what I did when I encountered it in yahoo:
       menu>web (built in browser)>your bookmark (e.g. yahoo) [press slightly longer, until you see the circular arrow and then a submenu]>edit>modify the access point corresponding to
       your hotspot (you will see the previously saved access point).
    3) If the 2 above options will only make it more troublesome for you, please download another
         browser such as Opera Mobile

  • I recently used Bluetooth speaker with my iPhone 4S  Now I  am unable to listen to music through headphones Iphone speakers, even when device is no longer recognised by phone.

    Please advise

    Hey Jennymagee,
    Thanks for the question. I understand you are experiencing issues with your iPhone 4s. The following resource may provide a solution:
    iPhone: No sound or distorted sound from speaker
    http://support.apple.com/kb/ts5180
    1. Verify that the volume is set to a level you would normally be able to hear.
    2. Ensure that there is nothing plugged in to the headset jack or the dock connector.
    3. If the iPhone is in a protective case, make sure that the speaker port isn't blocked by the case.
    4. Make sure that the speaker and dock port aren't clogged with debris. If necessary, clean it with a clean, small, dry, soft-bristled brush. Carefully and gently brush away any debris.
    5. If an audio issue occurs when using a specific application, try testing other applications to see if the issue persists.
    6. If the iPhone is paired with a Bluetooth headset or car kit:
              - Try turning off Bluetooth.
              - If you experience difficulties with the Bluetooth feature, follow these troubleshooting steps.
    7. Restart the iPhone.
    8. If restarting doesn't fix the issue, ensure that your iPhone is updated to the latest version of iOS.
    9. If the issue is not resolved after restoring the iPhone software, please contact Apple Support.
    If the issue persists, please follow the last step by contacting Apple Support for support and service options.
    Thanks,
    Matt M.

  • Connecting HP Notebooks to External Devices even when closed

    Dear HP Community,
    Even if you are a notebook user, once in a while, when working in the office, you would love to hook-up your notebook computer to a bigger LCD Monitor, plug-in  either a regular full-size USB keyboard and mouse, or  a wireless keyboard and mouse.
    I am doing it now, but the akward part is that my notebook has to be open and turned-on to be able to do this, is there any development in HP that would let the user hook up his/her HP notebook to an LCD monitor and keyboard and mouse, and with a push of a botton on the notebook  (even when the lcd-lid is closed) can turn the notebook into a "small footprint" desktop unit...
    This question was solved.
    View Solution.

    Dont know about at the push of a button, however you could configure (in power saving options under control panel) your machine so if the lid is shut, it only turns the laptop monitor off, as opposed to sleep mode/hibernate.
    Would be the way id tackle it anyway mate.

  • TCP Listener returned error on accept = AFP blows up. Need help

    Environment: 10.6.7 Server. Xserver. All Mac clients. It's a school. Problem: AFP refusing connections or not loading the Home Directory Symptoms: Library/Logs/AppleFileService/AppleFileServiceError.log blown out with "TCP Listener returned error on accept" happening every second.
    I cannot figure this out. The server has not been updated recently. -checkhostname returns no error. There have been some new iMacs (10.6.8) connected recently. I have read this might be MaxThreads; or corrupt .DS files, but I am really struggling. Please - any clues at all? I can't keep rebooting every day. Any ideas at all please.

    hi pkmusic, we are having the same problem. do you have phone over IP? we are using 5 servers (10.6.7 and 10.6.8) for user home directories. network goes through Siemens IP-Phones. Each server has max. 40 - 50 users but the error occures even if there are only 15 - 20 users connected. have to check the MaxThread-Settings next week ...

  • TCP Listen only accepts 1 packet

    Hello,
    I am trying to create a RS232 to TCP/IP converter VI. I am trying to use this VI to allow my main VI to communicate with a microcontroller (using rs232) over a network and I do not have access to a hardware converter.  The VI works great for sending data from the microcontroller ( rs232 -->TCP) but I am having problems getting information to the microcontroller (TCP --> rs232). I have tried numerous server configurations using the TCP Listen and Create Socket. For some reason I can only seem to receive a packet when using TCP Listen and no while loop but then it only receives 1 packet and none after that. I have used other programs to verify that the main VI is correctly sending the packet to that port and have verified that the problem is in this VI. 
    The following image is the "working" version that only receives the first packet sent to it 
    The following two pictures are the other configurations I've tried but they receive no packets.  
    TCP Listen with while loop 
    TCP Wait on Listener
     If you can provide any help it will be much appreciated.
     Thank you,
                 meanmon13
    Solved!
    Go to Solution.

    Those wont work because you aren't thinking dataflow. Dataflow means each piece will execute when all the inputs to it are available. Your first while loop runs forever. There is an input to the second while loop coming from the first while loop. Hence, it will never get to your second while loop, and thats why you aren't receiving anything.
    Put everything in one loop and use error wires to control the order
    Message Edited by for(imstuck) on 06-09-2010 11:26 AM
    CLA, LabVIEW Versions 2010-2013

  • Use 1 listener for multiple database in a server

    hi guys,
    just want to check whether this is the right way to configure my Listener.ORA . I am using 1 listener.ora to listen for incoming request connection from remote client. There are multiple databases installed in a server.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )sorry i am reading about it so did not install another database to test out. Just thinking in the line that it mention that the list of SID is refering to the multiple database that is installed in a server and i am using 1 listener.
    Please further advice.

    Shivananda Rao wrote:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )Please use as above. You can have one listener for multiple databases.right right so it the pattern goes like this:
    SID_LIST_LISTENER =
         (SID_LIST =
              (SID_DESC =
              (GLOBAL_DBNAME = AAAA)
              (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
              (SID_NAME = AAAA)
              (SID_DESC =
              (GLOBAL_DBNAME = BBBB)
              (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
              (SID_NAME = BBBB)
         )thanks !

  • Keeping a simple server open/listening for more than one connection

    Can someone please help me with a problem I am having. I'm running a server that accepts requests and processes data from a client. This program works FINE for one connection but as soon as I send the info to the server the connection closes and I have to manually restart the server to receive another connection from a client. I want to be able to keep the server open and accept multiple requests from the client without having to restart the server.java. I've looked in the forum and found some useful stuff but I still get this same error:
    Address in use: JVM_Bind
    Error during serialization
    Press any key to continue...
    I have included the code to my server.java file below. Like I said, it works perfectly for one connection but then closes down. Can anyone tell me where I need to add the code to make it stay open or if I even can. Seems unlogical that it wouldn't be able to. I'm just at a dead end on how to do it. Thanks in advance.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class Server extends JApplet{
    * Create the serversocket and use its stream to receive serialized objects
    public void init(){
    ServerSocket ser = null;
    Date d = null;
    try {
    ser = new ServerSocket(8020,10);
    * This will wait for a connection to be made to this socket.
    Socket soc = ser.accept();
    InputStream o = soc.getInputStream();
    ObjectInput s = new ObjectInputStream(o);
    String str = (String) s.readObject();
    d = (Date) s.readObject();
    final String nametop = soc.getInetAddress().getHostName();
    name n = new name(nametop,str);
    n.name = soc.getInetAddress().getHostName();
    JOptionPane.showMessageDialog(null,"There is a problem at station " + n.name + ".\n\nProblem:\n" + n.problem + "." ,"Problem",JOptionPane.ERROR_MESSAGE);
    System.out.println(d);
    System.out.println(n.name);
    System.out.println(n.problem);
    s.close();
    catch (Exception e) {
    System.out.println(e.getMessage());
    System.out.println("Error during serialization");
    System.exit(1);
    }//end of server
    // Create a main method
    public static void main( String args[] )
    //String name = soc.getInetAddress().getHostName();
    // create a window in which applet will execute
    JFrame appWindow = new JFrame("Problem Report");
    // create an instance of the applet
    Server app = new Server();
    // set the window size
    appWindow.setSize( 400, 400 );
    // add applet to window
    appWindow.getContentPane().add( app );
    // Simulate the normal startup sequence for an applet
    app.init();
    app.start();
    appWindow.show(); //calls paint()
    // add window close event handler
    appWindow.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e ) {
    System.exit( 0 );
    }//end of main
    }

    Hi! I suggest you to use different thread to realize a server functionality.
    First one server.java that has a main method and create at least two threads. One thread listens to the incoming connection request and stores the locally generated socket object into an static vector. The second thread will always look into this static vector. If there are sockets object in the vector, the second thread will take it out and process the connection request. These two threads should always be alive. The first thread lives in a endless loop while listening to the incoming connection request. The second thread is either waiting on the static vector or processing incoming connection request.
    If the expected incoming connection request will be too many for only one thread to process, you can create more threads in server.java at the beginning and they will all swith between two status: looking in the static vector or processing incoming connection request!
    Hope this will be help for you!

  • TCP Listen vi does not work in Labview RT 7.0

    I'm trying to use a TCP Listener to accept connections from another PC on the local network.
    When running the program with Labview 7.0 all works fine and I'm able to receive IP packets from the remote PC.
    However, when I run it in Labview RT 7.0, the TCP listener does not listen on the specified port.
    Another issue - after running the program in Labview 7.0, and then trying to run it again with Labview RT 7.0, if the specified port
    is the same, I get error 60: "The specified network address is currently in use."
    I'd appreciate your help,
    Alik

    Hi alikm,
    I am a little confused on what your set up is. When you say that you are running LabVIEW Real-Time, do you mean that you are running the program on a Real-Time target? How are you establishing that the project you are setting up is a Real-Time project?
    Also, if you are trying to access one port at the same time using two systems, you will get an error that you are not able to do this, since you can only write to a single port once at a time.
    Regards,
    Stephen S. 
    National Instruments
    Applications Engineering

  • SYSTEM ERROR: An accept of a new connection has failed: OS Error 4:

    hi,
    Iam using forte.Iam getting this error Can anyone help me out from this error..!!
    SYSTEM ERROR: An accept of a new connection has failed: OS Error 4:
    Interrupted system call
    Class: qqsp_RemoteAccessException
    Error #: [501, 236]
    Detected at: qqcm_ExternalConnection::AcceptConnections at 1
    Last TOOL statement: method EXEProtocolManager.Listen
    waiting for your valuable reply

    Hi Suresh
    Give more details abot your OS. Can you share the source in EXEProtocolManager.Listen method?
    GS
    Iam using forte.Iam getting this error Can anyone
    help me out from this error..!!
    SYSTEM ERROR: An accept of a new connection has
    failed: OS Error 4:
    Interrupted system call
    Class: qqsp_RemoteAccessException
    Error #: [501, 236]
    Detected at:
    qqcm_ExternalConnection::AcceptConnections at 1
    Last TOOL statement: method
    EXEProtocolManager.Listen
    waiting for your valuable reply

Maybe you are looking for