#13 Leaving "TIME_WAIT" sockets??

closed-works-for-me
nobody
None
5
2015-02-06
2006-11-17
Johan_Winas
No

I use ser2net for controling pan/tilt cameras over ip networks, and right now over a wireless network. I,ve been trying to find the source to a problem where I dont get any data over ser2net from time to time. By restarting ser2net it works again, but thats not realy a good option. On closer examination I found alot of "TIME_WAIT" sockets belonging to ser2net for the port that dont work. First I assigned this to a client problem, but.
If I telnet in to ser2net from localhost, and then do "quit", ser2net closes the connection. But, there is a "TIME_WAIT" socket left for this session!
--snip--
root@Jordfallsmotet[6] /home/web/cgi-bin # netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:4000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:4002 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 0 192.168.6.10:4002 192.168.6.1:53639 ESTABLISHED
tcp 0 0 192.168.6.10:8080 192.168.6.1:48064 ESTABLISHED
tcp 0 546 192.168.6.10:23 192.168.6.1:53634 ESTABLISHED
tcp 0 0 192.168.6.10:4000 192.168.6.1:53640 ESTABLISHED
tcp 0 0 192.168.6.10:23 192.168.6.1:53636 ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
root@Jordfallsmotet[6] /home/web/cgi-bin # telnet 127.0.0.1 8000

Entering character mode
Escape character is '^]'.

-> quitConnection closed by foreign host.
root@Jordfallsmotet[6] /home/web/cgi-bin # netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:4000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:4002 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 0 192.168.6.10:4002 192.168.6.1:53639 ESTABLISHED
tcp 0 0 192.168.6.10:8080 192.168.6.1:48064 ESTABLISHED
tcp 0 546 192.168.6.10:23 192.168.6.1:53634 ESTABLISHED
tcp 0 0 127.0.0.1:8000 127.0.0.1:1508 TIME_WAIT
tcp 0 0 192.168.6.10:4000 192.168.6.1:53640 ESTABLISHED
tcp 0 0 192.168.6.10:23 192.168.6.1:53636 ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
root@Jordfallsmotet[6] /home/web/cgi-bin #
--snap--
I set the ser2net to listen to port 8000 for telnet control. After I "quit" the tcp sockets is still there, in "TIME_WAIT" state.

What seams to happen when I run this live, is that I get a packet error and my client disconnects, and then reconnects. If that happens to quickly ser2net runs out of sockets or something. That means that my new connection dont get any data to or from the rs232 port until some of these "Time_wait" sockets are gone.

/Johan

Discussion

  • Corey Minyard

    Corey Minyard - 2006-12-01

    Logged In: YES
    user_id=236278
    Originator: NO

    You don't mention what OS you are running on or what version of ser2net you are running. I could not reproduce this on Linux with the most current ser2net version. If you can still reproduce with the most current version, please re-open the defect.

     
  • Corey Minyard

    Corey Minyard - 2006-12-01
    • status: open --> closed-works-for-me
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks