From owner-freebsd-ports-bugs@freebsd.org Wed Aug 23 13:05:40 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43920DE6C98 for ; Wed, 23 Aug 2017 13:05:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 318736F4FE for ; Wed, 23 Aug 2017 13:05:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7ND5duY073462 for ; Wed, 23 Aug 2017 13:05:40 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 221740] net-mgmt/nrpe: not starting after crash Date: Wed, 23 Aug 2017 13:05:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mat@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: zeising@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 13:05:40 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221740 Bug ID: 221740 Summary: net-mgmt/nrpe: not starting after crash Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: zeising@FreeBSD.org Reporter: mat@FreeBSD.org Assignee: zeising@FreeBSD.org Flags: maintainer-feedback?(zeising@FreeBSD.org) Created attachment 185691 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D185691&action= =3Dedit v1 When nrpe quits ungracefully, for example, if the box was rebooted, it often does not start because the pid file is still there, and the pid in it exists and the pid in it is in use by some other process. The dubious code is in src/nrpe.c in write_pid_file() around line 1756 that could be axed. But I think the easiest way to fix this is with the attached patch. precmd = is run just before starting the daemon and after checking that it is not alrea= dy running. With this, it starts just fine, and still refuses to start if it is really already running, but starts fine if the pid file contains a pid that exists= but is not nrpe. --=20 You are receiving this mail because: You are the assignee for the bug.=