Menu

Error with multiple connections

Help
2009-07-28
2013-05-20
  • Jeff Hedlund

    Jeff Hedlund - 2009-07-28

    I have two ports pooled (as described in this post:  https://sourceforge.net/forum/message.php?msg_id=7506826 )

    The first two connections are fine.  If a 3rd connection attempts the client looks something like this:

    TCP(1) START
    TCP(1) SEND: WILL 44
    TCP(1) SEND: SB 44
    1 0 0 4 176 SE
    TCP(1) SEND: SB 44
    2 7 SE
    TCP(1) SEND: SB 44
    3 3 SE
    TCP(1) SEND: SB 44
    4 1 SE
    TCP(1) SEND: SB 44
    5 9 SE
    TCP(1) SEND: SB 44
    5 12 SE
    TCP(1) SEND: SB 44
    5 6 SE

    Which looks to be an error due to the 2 connections already connected?  I'm OK with that (if that's what it is), but if one of the other two clients disconnects (Ctrl-C), the 3rd client still can't connect (same error as above).

    On the SERVER side, it's getting these errors:

    Accept(774) = 73c from [clientIP]:2323
    ReadOverlapped::StartRead(): ReadFileEx(73c) TCP(3) ERROR Unknown error (64)
    TCP(3) START
    TCP(3) SEND: WILL 1
    TCP(3) SEND: DO 44
    TCP(3) SEND: SB 44
      107 48 SE
    WriteOverlapped::StartWrite(): WriteFileEx(73c) TCP(3) ERROR Unknown error (64)
    Close(73c) - OK
    TCP(3) STOP
    Write lost TCP(3): 13, total 39

    Am I doing something wrong with disconnecting from com2tcp-rfc2217 (using Ctrl-C)?

    NOTE:  This happens without actually dialing out...

    Thanks,
    Jeff

     
    • Jeff Hedlund

      Jeff Hedlund - 2009-07-28

      I think I may see what's going on...  not sure if it's a bug in hub4com, or just some configuration parameter I'm missing.

      The error only happens if I try to connect while the hub4com server is full. 

      For testing purposes, i brought it down to only 1 COM port on the server via:

        com2tcp-rfc2217.bat COM6 5555

      I have two client computers, 192.168.0.50 and 192.168.0.70.

      I connect with 192.168.0.50 and I see the message in hub4com server output "Accept from 192.168.0.50:3282".  netstat on the server shows the connection from 192.168.0.50:3282.

      Everything's good, so I disconnect and see the Close - OK and TCP(1) STOP messages.

      I connect with 192.168.0.70 and I see the message in hub4com server output "Accept from 192.168.0.70:3627".  netstat on the server shows the connection from 192.168.0.70:3627.

      At this point, I leave .70 up and try to connect with .50.  hub4com on the server shows nothing in it's output.  netstat shows two connections:  .70:3627 and .50:3283.  I disconnect from .50, still nothing from hub4com on the server.  I disconnect from .70 and I see the Close - OK and TCP(1) STOP.

      Now I try to open a connection from .50 again.  I can tell it's failed on the client due to the different output from hub4com on the client (mentioned in previous post).  Here's the interesting thing.  netstat on the server shows the connection from .50:3291.  But the hub4com output on the server shows the message "Accept from .50:3283".  So hub4com seems to have confused the port numbers.
      (and actually, during my testing, I saw it would occassionally confuse the IP address as well).

      This seems to fit with error 64 from Microsoft's getLastError number (which I assume is what is being printed out for "ERROR Unknown error (64)".  64 via MS is "The specified network name is no longer available." (via http://msdn.microsoft.com/en-us/library/ms681382%28VS.85%29.aspx )   True - because it's the wrong network address.

      So again, I could be barking up the wrong tree or hopefully I just am missing a configuration.

      Any help would be much appreciated.

      Thanks,
      Jeff

       
    • Vyacheslav Frolov

      Fixed in CVS

       

Log in to post a comment.