Bug 210912 - net/nss-pam-ldapd: nslcd daemon conflict with other daemons
Summary: net/nss-pam-ldapd: nslcd daemon conflict with other daemons
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-08 08:33 UTC by Marc Siebeneicher
Modified: 2016-10-03 21:17 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Siebeneicher 2016-07-08 08:33:54 UTC
nslcd conflict with other daemon if that started before nslcd. In this case you get the following error 

# service nslcd start
nslcd already running?  (pid=6035 6856).

The pid id is related to the other running daemon.

The working solution for us is to add the pidfile definition to the head/net/nss-pam-ldapd/files/nslcd.in service script:

[...]
command="/usr/sbin/daemon";
pidfile="/var/run/${name}.pid"
start_precmd=nslcd_prestart
start_cmd=nslcd_start
status_cmd=nslcd_status
stop_cmd=nslcd_stop
[...]


The issue founded on a FreeBSD 10.3 system:

# dmesg
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 12:23:44 UTC 2016
    root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
[...]
Comment 1 Ryan Steinmetz freebsd_committer freebsd_triage 2016-07-08 12:15:25 UTC
What is the output from:

ps auxw 6035 6856
Comment 2 Marc Siebeneicher 2016-07-08 12:43:22 UTC
(In reply to Ryan Steinmetz from comment #1)

root@vagrant-qa-preview:/home/vagrant # ps auxw 6035 6856
USER      PID  %CPU %MEM     VSZ   RSS TT  STAT STARTED      TIME COMMAND
root       11 200.0  0.0       0    32  -  RL    9:24AM 380:33.42 [idle]
root        0   0.0  0.0       0   176  -  DLs   9:24AM   0:02.19 [kernel]
root        1   0.0  0.0    9492   912  -  SLs   9:24AM   0:00.02 /sbin/init --
root        2   0.0  0.0       0    32  -  DL    9:24AM   0:02.48 [cam]
root        3   0.0  0.0       0    16  -  DL    9:24AM   0:00.00 [sctp_iterator]
root        4   0.0  0.0       0    32  -  DL    9:24AM   0:00.50 [pagedaemon]
root        5   0.0  0.0       0    16  -  DL    9:24AM   0:00.00 [vmdaemon]
root        6   0.0  0.0       0    16  -  DL    9:24AM   0:00.00 [pagezero]
root        7   0.0  0.0       0    48  -  DL    9:24AM   0:00.85 [bufdaemon]
root        8   0.0  0.0       0    16  -  DL    9:24AM   0:00.15 [vnlru]
root        9   0.0  0.0       0    16  -  DL    9:24AM   0:01.52 [syncer]
root       10   0.0  0.0       0    16  -  DL    9:24AM   0:00.00 [audit]
root       12   0.0  0.0       0   192  -  WL    9:24AM   0:14.91 [intr]
root       13   0.0  0.0       0    48  -  DL    9:24AM   0:00.02 [geom]
root       14   0.0  0.0       0    16  -  DL    9:24AM   0:03.27 [rand_harvestq]
root       66   0.0  0.0       0    16  -  DL    9:24AM   0:00.01 [md0]
root      265   0.0  0.1   14656  2156  -  Is    9:24AM   0:00.00 dhclient: em0 [priv] (dhclient)
_dhcp     312   0.0  0.1   14656  2268  -  Is    9:24AM   0:00.00 dhclient: em0 (dhclient)
root      446   0.0  0.2   13628  4932  -  Is    9:24AM   0:00.01 /sbin/devd
root      533   0.0  0.1   16616  2160  -  Ss    9:24AM   0:00.09 /usr/sbin/syslogd -s
root      653   0.0  0.1   30264  2988  -  Ss    9:24AM   0:01.50 /usr/local/sbin/VBoxService
root      766   0.0  0.1   14492  1928  -  Is    9:24AM   0:00.00 daemon: /usr/local/bin/gollum[768] (daemon)
root      768   0.0  0.7   45808 14524  -  S     9:24AM   0:01.81 /usr/local/bin/gollum -ll 1 -m 19119 -c /appdata/gollum/config/go
root      770   0.0  0.1   14492  1928  -  Is    9:24AM   0:00.00 daemon: /usr/local/bin/gollum[771] (daemon)
root      771   0.0  0.7   46996 14660  -  I     9:24AM   0:01.83 /usr/local/bin/gollum -ll 1 -m 19117 -c /appdata/gollum/config/go
root      820   0.0  0.1   18712  2264  -  Ss    9:24AM   0:00.05 /usr/sbin/cron -s
root     1480   0.0  0.4   73956  7516  -  Is    9:27AM   0:00.15 /usr/local/libexec/postfix/master -w
postfix  1482   0.0  0.4   76068  7576  -  I     9:27AM   0:00.05 qmgr -l -t unix -u
root     1948   0.0  2.1 1149084 44500  -  Ss    9:27AM   0:00.97 /usr/local/sbin/httpd
root     2156   0.0  0.3   63404  6980  -  Ss    9:27AM   0:00.05 /usr/sbin/sshd
root     2341   0.0  2.3  236976 46648  -  I     9:32AM   0:34.80 /usr/local/bin/python2 /usr/local/bin/salt-minion -c /usr/local/e
postfix 11668   0.0  0.4   76016  8076  -  I    11:07AM   0:00.04 pickup -l -t unix -u
root    17543   0.0  0.1   14492  1928  -  Is   11:58AM   0:00.00 daemon: /usr/local/bin/gollum[17544] (daemon)
root    17544   0.0  1.0   55188 20548  -  S    11:58AM   0:00.89 /usr/local/bin/gollum -ll 1 -m 19120 -c /appdata/gollum/config/go
root    17810   0.0  1.0   59448 20688  -  I    12:01PM   0:00.52 /usr/local/bin/gollum -ll 1 -m 19116 -p /var/run/gollum_error.pid
root    17812   0.0  1.0   55352 20584  -  I    12:01PM   0:00.49 /usr/local/bin/gollum -ll 1 -m 19115 -p /var/run/gollum_access.pi
nobody  17825   0.0  2.1 1149084 44516  -  S    12:01PM   0:00.01 /usr/local/sbin/httpd
nobody  17826   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17827   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17828   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17829   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17830   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17831   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17832   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17833   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
nobody  17834   0.0  2.1 1149084 44516  -  I    12:01PM   0:00.00 /usr/local/sbin/httpd
root    21934   0.0  0.4   90764  7308  -  Is   12:39PM   0:00.01 sshd: vagrant [priv] (sshd)
vagrant 21938   0.0  0.4   90764  7648  -  S    12:39PM   0:00.08 sshd: vagrant@pts/0 (sshd)
root      870   0.0  0.1   14520  1976 v0  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv0
root      871   0.0  0.1   14520  1976 v1  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv1
root      872   0.0  0.1   14520  1976 v2  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv2
root      873   0.0  0.1   14520  1976 v3  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv3
root      874   0.0  0.1   14520  1976 v4  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv4
root      875   0.0  0.1   14520  1976 v5  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv5
root      876   0.0  0.1   14520  1976 v6  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv6
root      877   0.0  0.1   14520  1976 v7  Is+   9:24AM   0:00.00 /usr/libexec/getty Pc ttyv7
vagrant 21939   0.0  0.2   25688  3384  0  Is   12:39PM   0:00.01 -csh (csh)
root    21942   0.0  0.2   52476  3364  0  I    12:39PM   0:00.00 sudo su
root    21943   0.0  0.1   49824  2772  0  I    12:39PM   0:00.00 su
root    21944   0.0  0.2   25688  3424  0  S    12:39PM   0:00.02 _su (csh)
root    22018   0.0  0.1   18768  2224  0  R+   12:42PM   0:00.00 ps auxw 6035 6856



The conflicted daemon is the gollum service in this case
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-10-03 20:53:53 UTC
A commit references this bug:

Author: zi
Date: Mon Oct  3 20:52:58 UTC 2016
New revision: 423225
URL: https://svnweb.freebsd.org/changeset/ports/423225

Log:
  - Update to 0.9.7
  - Specify path to pidfile in rc script

  PR:		210912, 213030
  Submitted by:	Marc Siebeneicher, Brent Busby

Changes:
  head/net/nss-pam-ldapd/Makefile
  head/net/nss-pam-ldapd/distinfo
  head/net/nss-pam-ldapd/files/nslcd.in
  head/net/nss-pam-ldapd/files/patch-Makefile.in