How to manually remove the faulty RHDS instance since 'dsctl' command is not able to remove it
Environment
- Red Hat Directory Server 11
- dsctl
Issue
- Unable to remove the RHDS instance using the
dsctlcommand from the system. dsctlcommand does show another instance but it's not showing in the ps output.
[root@rhds02 ~]# dsctl -l
slapd-master01
slapd-master02
[root@rhds02 ~]# dsctl slapd-master01 status
No such instance 'slapd-master01' <----
Unable to access instance information. Are you running as the correct user? (usually dirsrv or root)
[root@rhds02 ~]# ps aux | grep ns-slapd
root 1118592 0.0 0.0 12140 1072 pts/0 S+ 17:00 0:00 grep --color=auto ns-slapd
dirsrv 1824817 3.9 3.8 1220180 619308 ? Ssl Jul26 121:26 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-master02 -i /run/dirsrv/slapd-master02.pid
[root@rhds02 ~]# dsctl slapd-master01 stop
No such instance 'slapd-master01'
Unable to access instance information. Are you running as the correct user? (usually dirsrv or root)
Resolution
- Confirm the active & faulty RHDS instances on the system:
# ll -d /etc/dirsrv/slapd-*
drwxr-xr-x. 2 root root 106 Jul 26 13:55 /etc/dirsrv/slapd-master01 <---- This needs to be removed
drwxrwx---. 3 dirsrv dirsrv 4096 Aug 2 09:38 /etc/dirsrv/slapd-master02
- Remove following directory manually:
# rm -rf /etc/dirsrv/slapd-master01/*
- Confirm if faulty RHDS instance has been removed from the system:
# dsctl -l
slapd-master02
Diagnostic Steps
- Confirm if there is any faulty RHDS instance present on the system using
dsctl&pscommands:
[root@rhds02 ~]# dsctl -l
slapd-master01
slapd-master02
[root@rhds02 ~]# dsctl slapd-master01 status
No such instance 'slapd-master01' <----
Unable to access instance information. Are you running as the correct user? (usually dirsrv or root)
[root@rhds02 ~]# ps aux | grep ns-slapd
root 1118592 0.0 0.0 12140 1072 pts/0 S+ 17:00 0:00 grep --color=auto ns-slapd
dirsrv 1824817 3.9 3.8 1220180 619308 ? Ssl Jul26 121:26 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-master02 -i /run/dirsrv/slapd-master02.pid
[root@rhds02 ~]# dsctl slapd-master01 stop
No such instance 'slapd-master01'
Unable to access instance information. Are you running as the correct user? (usually dirsrv or root)
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments