Eric reported me slow login on Solaris 10 machines, i started my investigation from name resolution & i found that the machine was unable to resolve hostname(s) from DNS. initially i was expecting some kind of misconfiguration of resolv.conf but lately i found that DNS server of that environment was down!
So i simply shoot
#svcadm -v restart network/iplanetldapbut found that service did'nt started :(
anyhow with further investigation i found following,
Symptoms:when you will run
svcadm -v restart network/iplanetldap you will get following error in log file i.e.
Error:# cat /var/svc/log/network-iplanetldap:default.log[ Oct 18 23:02:34 Executing start method ("/opt/iplanet/ldap/slapd-hostname/start-slapd") ]/sbin/sh: /opt/iplanet/ldap/slapd-hostname/start-slapd: not foundHint:HOSTNAME in error was wrong! so i found the cause, that somehow ldap daemon startup script is not getting correct hostname of the machine.
Fix:Run following command to check store configuration for ldap daemon.
Step 01: #svccfg export network/iplanetldap > /tmp/ldap-old-config.xmlthis will create a file “
/tmp/ldap-old-config.xml” you should vi/edit this file & correct hostname inside.
Output of the file is:
bash-3.00# vi /tmp/ldap-old-config.xml
edit following lines:
name='start' type='method' exec='/opt/iplanet/ldap/slapd-hostname/start-slapd' timeout_seconds='60'
name='stop' type='method' exec='/opt/iplanet/ldap/slapd-hostname/stop-slapd' timeout_seconds='60'
Step 02: svccfg import /tmp/ldap-old.xmlStep 03: svcadm -v restart network/iplanetldapStep 04:
svcadm -v clear network/iplanetldapStep 05: svcs -l network/iplanetldapcheers