> > > > Can you please post the output of sudo ipactl restart. I am suspicious > > it's not a DS issue, but another component of IPA is failing that > > causes the dirsrv to stop. > > > > Can you post the yml of the service command you were using? > > > > What version of EL are you running? > > This is CentOS 6.7. I could post the output of 'sudo ipactl restart' but that > wouldn't show the problem. > > 1) If I'm logged in to a shell (SSH) it works > 2) If I do it via "ssh host 'command'" it works > > It is only when I invoke it via Ansible that it shows this behavior. Also > noted: it behaves this way just stand alone (see above). Using just > /etc/init.d/dirsrv start, it will shut down as soon as the connection goes > away. The attached log show the entire process from startup to shutdown. Please do *not* use /etc/init.d scripts. You *must* use "service <name> <action>" > > Invoking this (via an ansible shell command) fails to work correctly as well: > > - name: Start Dirsrv > shell: nohup screen -d -m /usr/sbin/start-dirsrv > > So even trying to nohup + using screen to "background" it, it still shuts down > immediately after that 'shell' stanza is done. > > Even this fails: nohup screen -d -m /usr/sbin/start-dirsrv & disown Yes, because this process forks into the background. You would expect it to go away. > > The ansible output from just invoking /usr/sbin/start-dirsrv is: > > changed: [192.168.122.12] => {"changed": true, "cmd": "/usr/sbin/start- > dirsrv", "delta": "0:00:02.760271", "end": "2016-02-11 12:40:15.909214", "rc": > 0, "start": "2016-02-11 12:40:13.148943", "stderr": "", "stdout": "Starting > instance \"KUGLER-LOCALDOMAIN\"\nStarting instance \"PKI-IPA\"", > "stdout_lines": ["Starting instance \"KUGLER-LOCALDOMAIN\"", "Starting > instance \"PKI-IPA\""], "warnings": []} > > So it successfully starts. No errors. But then shuts down right away. That log shows a clean slapd shutdown, not a termination or crash. What happens if you use the ansible service module with -vvvv IE: - name: Start dirsrv sudo: yes action: service enabled=yes state=restarted Have you got any esoteric arguments in say /etc/sysconfig/dirsrv? Are you adding extra cli args like -d 0 to ns-slapd? (That would certainly break it ... ). Are you running your ansible playbooks at sudo? Trying to start ns-slapd without privileges would cause issues. Can you see anything in /var/log/messages? When you use ansible to control ipa rather than dirsrv directly, does that have the same issue? I think the issue is not with dirsrv at all, but with your ansible environment and how you are trying to start / stop the services.... -- Sincerely, William Brown Software Engineer Red Hat, Brisbane
Attachment:
signature.asc
Description: This is a digitally signed message part
-- 389 users mailing list 389-users@%(host_name)s http://lists.fedoraproject.org/admin/lists/389-users@xxxxxxxxxxxxxxxxxxxxxxx