Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D8BD114FE for ; Sun, 3 Aug 2014 14:58:14 +0000 (UTC) Received: (qmail 1176 invoked by uid 500); 3 Aug 2014 14:58:13 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 916 invoked by uid 500); 3 Aug 2014 14:58:13 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 744 invoked by uid 99); 3 Aug 2014 14:58:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2014 14:58:13 +0000 Date: Sun, 3 Aug 2014 14:58:13 +0000 (UTC) From: "Brad Trantham (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DIRSERVER-1990) Lock file named incorrectly on CentOS (& possibly others?) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRSERVER-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14083999#comment-14083999 ] Brad Trantham edited comment on DIRSERVER-1990 at 8/3/14 2:57 PM: ------------------------------------------------------------------ I agree that my quick fix (providing a fixed value for the parameter) is not suitable as a permanent solution. The solution is that the lock file needs to be named in a manner that is consistent with the KXX script in rc6.d. Even if I were to use a non-default instance name like "bradsapacheds" then the names /etc/rc6.d/K35apacheds-2.0.0_M16-bradsapacheds and /var/lock/subsys/bradsapacheds would not match, the lock file would not get removed upon server shutdown, and this problem would persist. The lock file needs "apacheds-2.0.0_M16-" as part of its name or the KXX script in rc6.d needs to be named with only the instance name and not "apacheds-2.0.0_M16-$INSTANCE" was (Author: btrantham): I agree that my quick fix (providing a fixed value for the parameter) is not suitable as a permanent solution. The solution is that the lock file needs to be named in a manner that is consistent with the KXX script in rc6.d. Even if I were to use a non-default instance name like "bradsapacheds" then the names /etc/rc6.d/K35apacheds-2.0.0_M16-bradsapacheds and /var/lock/subsys/bradsapacheds would not match, the lock file would not get removed upon server shutdown, and this problem would persist. > Lock file named incorrectly on CentOS (& possibly others?) > ---------------------------------------------------------- > > Key: DIRSERVER-1990 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1990 > Project: Directory ApacheDS > Issue Type: Bug > Affects Versions: 2.0.0-M16 > Environment: CentOS 6.5 > Reporter: Brad Trantham > Priority: Minor > > I was having trouble configuring my ApacheDS installation to auto-start when the server boots. During boot it would log an error saying that the default instance was already running but there was no ApacheDS process running and I was unable to connect to the LDAP instance. > ApacheDS would start/stop with no problem when I ran it manually but it seemed like it wouldn't shut down cleanly during server shutdown, it was leaving the pid file in place which was preventing it from retstarting upon boot. > After digging into various searches online I uncovered a suggestion that CentOS would not kill a process if the lock file was named something other than what the shutdown script in rc6.d was named. This was the case for me, the rc6.d script was called K35apacheds-2.0.0_M16-default but the lock file under /var/lock/subsys was simply called default. > I fixed this for my installation by changing line 144 of /opt/apacheds-2.0.0_M16/bin/apachds from: > LOCKFILE="$LOCKDIR/$INSTANCE" > to > LOCKFILE="$LOCKDIR/apacheds-2.0.0_M16-default" > Obviously the real fix should be a bit cleaner than that but it worked and now my ApacheDS installation shuts down cleanly when the server is restarted and reliably starts up upon boot. -- This message was sent by Atlassian JIRA (v6.2#6252)