Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1
    Junior Member JensD's Avatar
    Join Date
    Jan 2016
    Posts
    8

    CLOSE_WAIT after restart

    Perhaps this is more a Linux question than a LMS question ... anyway ;-)

    I'm running LMS on a Raspberry Pi with Debian Wheezy, LMS latest version.

    When I restart my LMS ('service logitechmediaserver restart'), I find usually a remarkable number of TCP connections marked as "CLOSE_WAIT", most of them to the players.
    Is there a more gracefully way to restart the server, so it would close the sockets before quitting?

    Jens

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Location
    UK
    Posts
    966
    Those are closed. Iirc it's up to the other end to complete the close before they will disappear from the kernel's connection list. They will disappear before long and are generally harmless.


    Transcoded from Matt's brain by Tapatalk
    Last edited by drmatt; 2017-09-28 at 01:23.
    --
    Hardware: 3x Touch, 1x Radio, 2x Receivers, 1 HP Microserver NAS with Debian+LMS 7.9.0
    Music: ~1300 CDs, as 450 GB of 16/44k FLACs. No less than 3x 24/44k albums..

  3. #3
    Junior Member JensD's Avatar
    Join Date
    Jan 2016
    Posts
    8
    Quote Originally Posted by drmatt View Post
    Those are closed. Iirc it's up to the other end to complete the close
    From my understanding that would result in a TIME_WAIT, and CLOSE_WAIT indicates the server didn't closed the connections (e.g. to the players) correctly when exiting.
    When I do a few restarts of LMS it piles up and stays indefinitly. Reboot :-(

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    15,232
    Quote Originally Posted by JensD View Post
    From my understanding that would result in a TIME_WAIT, and CLOSE_WAIT indicates the server didn't closed the connections (e.g. to the players) correctly when exiting.
    When I do a few restarts of LMS it piles up and stays indefinitly. Reboot :-(
    Restart LMS should close down the sockets properly. Could the problem be the players trrying to access server ports which are not active yet (i.e. between shutdown and restart) and socket open by player has failed and waiting to be closed. Remember it is player who contact LMS and so if LMS goes down - they still keep trying to connect

    What socket number have the CLOSE_WAIT ?
    Nothing in TCP should be indefinite. What is the TCP timeout setting on your system ? Have you fiddled with TCP parameter or used an application which "optimised" your system ?

    edit:

    The usual TCP timeout setting (usually found here /proc/sys/net/ipv4/tcp_fin_timeout ) is 60 secs.
    Last edited by bpa; 2017-09-29 at 05:33.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •