From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id M4WzAuyPcF9vOAAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 13:13:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WCCyOeuPcF+SZgAAbx9fmQ (envelope-from ) for ; Sun, 27 Sep 2020 13:13:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1BB8494013C for ; Sun, 27 Sep 2020 13:13:15 +0000 (UTC) Received: from localhost ([::1]:43816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMWUM-0007gq-3g for larch@yhetil.org; Sun, 27 Sep 2020 09:13:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMRcE-0002wc-VJ for bug-guix@gnu.org; Sun, 27 Sep 2020 04:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMRcE-0003s7-Lr for bug-guix@gnu.org; Sun, 27 Sep 2020 04:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMRcE-0003f2-Hn for bug-guix@gnu.org; Sun, 27 Sep 2020 04:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43643: start shepherd when a previous instance was killed by kill -9 Resent-From: gfleury Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Sep 2020 08:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43643 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43643@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160119362614019 (code B ref -1); Sun, 27 Sep 2020 08:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Sep 2020 08:00:26 +0000 Received: from localhost ([127.0.0.1]:48259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMRbd-0003e3-Oi for submit@debbugs.gnu.org; Sun, 27 Sep 2020 04:00:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:42292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMRba-0003du-FF for submit@debbugs.gnu.org; Sun, 27 Sep 2020 04:00:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMRba-0002sE-4o for bug-guix@gnu.org; Sun, 27 Sep 2020 04:00:22 -0400 Received: from knopi.disroot.org ([178.21.23.139]:60598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMRbX-0003ga-Oj for bug-guix@gnu.org; Sun, 27 Sep 2020 04:00:21 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 007B151B70 for ; Sun, 27 Sep 2020 10:00:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aIS-lFdWaRH1 for ; Sun, 27 Sep 2020 10:00:14 +0200 (CEST) From: gfleury DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1601193614; bh=1/z8aHvQMs1gJqmGrcFc9IQzhv/aLpv9VnFuvdfOUJg=; h=From:To:Subject:Date; b=OysCx/eGgDpMg5xEyzdKxtWP/7JE7p1LVTyXIZjEctZHLolh3W8bt0UdJlJ7Z1Osd qebd8pRGtVGpFJOsCaWUxIqsRYxJ++FiU+izl0MO/zBttN+hpOM/byQipl5bhlEFSJ nJ0sJtZxRphgtFPxBAMPw/dJfPeyUZUwmrPpljDXB5tlsqnXkBU4aQavucnd/prd4S a4aaFmMq3yyxOHxVlgSAzJoIV9VAB8K8BQHWeSDaY0w6uLdgCk4iv52yko3ZcoOyaQ bUKQA7ioUJAkuUXp/65wyaVVUKHnzt+Z35ju11IQN9OwoOT7QkB/2z1509Dy/JfhCN /K0vjivpl+14g== Date: Sun, 27 Sep 2020 10:00:03 +0200 Message-ID: <87k0wfejjw.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=178.21.23.139; envelope-from=gfleury@disroot.org; helo=knopi.disroot.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/27 04:00:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) X-Mailman-Approved-At: Sun, 27 Sep 2020 09:12:57 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=disroot.org header.s=mail header.b=OysCx/eG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disroot.org (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.09 X-TUID: Hm09gZanRHfP --=-=-= Content-Type: text/plain Hi, when killing shepherd i.e `pkill -9 shepherd` it left behind `default-socket-file` and when restarted whithout remove the socket like --------------------------------------------------------- rm /var/run/user/1000/shepherd/socket --------------------------------------------------------- it throws a error: --------------------------------------------------------- 3 (primitive-load "/home/gfleury/prod/shepherd/./shepherd") In shepherd.scm: 56:14 2 (main . _) 49:6 1 (open-server-socket _) In unknown file: 0 (bind # #(1 "/run/user/1000?") #) ERROR: In procedure bind: In procedure bind: Address already in use --------------------------------------------------------- something like this patch can fix it. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ensure-that-default-socket-file-is-not-present.patch >From 7d16c47bad6fd98cf0838d2fcd62735d846e7bab Mon Sep 17 00:00:00 2001 From: gfleury Date: Sun, 27 Sep 2020 09:29:37 +0200 Subject: [PATCH] ensure that `default-socket-file` is not present. * modules/shepherd.scm(main): remove a possible `default-socket-file` left by a previous instance. --- modules/shepherd.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/shepherd.scm b/modules/shepherd.scm index 9f80f62..d18567e 100644 --- a/modules/shepherd.scm +++ b/modules/shepherd.scm @@ -147,7 +147,10 @@ already ~a threads running, disabling 'signalfd' support") (initialize-cli) (let ((config-file #f) - (socket-file default-socket-file) + (socket-file + (begin + (false-if-exception (delete-file default-socket-file)) + default-socket-file)) (pid-file #f) (secure #t) (logfile #f)) -- 2.28.0 --=-=-=--