From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: VNC server for KVM VM Date: Fri, 14 Aug 2009 17:13:13 -0500 Message-ID: <4A85E179.7060500@codemonkey.ws> References: <20090814205839.GA32226@defiant.freesoftware.org> <4A85D6E0.6060103@messageone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, daniel-listas@gmx.net To: Charles Duffy Return-path: Received: from mail-qy0-f196.google.com ([209.85.221.196]:56512 "EHLO mail-qy0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755241AbZHNWNO (ORCPT ); Fri, 14 Aug 2009 18:13:14 -0400 Received: by mail-qy0-f196.google.com with SMTP id 34so1390972qyk.33 for ; Fri, 14 Aug 2009 15:13:16 -0700 (PDT) In-Reply-To: <4A85D6E0.6060103@messageone.com> Sender: kvm-owner@vger.kernel.org List-ID: Charles Duffy wrote: > Daniel Bareiro wrote: >> inet_listen: bind(ipv4,0.0.0.0,5903): Address already in use >> inet_listen: FAILED > > If you check with netstat, I expect you'll see the port in TIME_WAIT > state; if so, this will eventually clean itself up if you just wait a > little bit before restarting. > > One option to avoid it is to make sure all connections are closed > properly on shutdown; another is to set the SO_REUSEADDR flag on the > socket before the bind() call. We set SO_REUSEADDR. Regards, Anthony Liguori