I am doing a test installation of ZCS 5.0.2_GA_1775_F7. This is my first installation of zimbra . On running install.sh at a stage I got a message Initializing ldap - failed (28416) .

The last part of the zmsetup.log is below

IO::Socket::INET: connect: Connection refused at /opt/zimbra/libexec/zmldapinit line 160.
failed. (28416)
ERROR
Configuration failed
Please address the error and re-run /opt/zimbra/libexec/zmsetup.pl to
complete the configuration.

Line 160 of /opt/zimbra/libexec/zmldapinit is

my $ldap = Net::LDAP->new("$ldap_master_url") or die "$@";

I removed 'or die "$@"" from the line 160 and ran zmsetup.pl

I was able to complete setup but ldap is not initialized and I can not log on to the admin console.
The following results was obtained with zmcontrol

[zimbra@mypc ~]$ zmcontrol status
Unable to determine enabled services from ldap.
Unable to determine enabled services. Cache is out of date or doesn't exist

Please offer me solutions on how to resolve the problem.

A display of startup.log is below

[zimbra@mypc log]$ cat startup.log
Host mypc.macsonia.local.
Starting ldap...Done.
FAILED
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
/opt/zimbra/bin/ldap: line 57: kill: (16016) - No such process
sudo: sorry, you must have a tty to run sudo
Failed to start slapd. Attempting debug start to determine error.

A part of the zmsetup.log is displayed below to help you in proffering solutions.
Thanks.

a previous configuration appears to have failed to complete

Saving config in /opt/zimbra/config.9281...
done.
Operations logged to /tmp/zmsetup.04072008-153703.log
checking isEnabled zimbra-ldap
zimbra-ldap is enabled
Initializing ldap...
*** Running as zimbra user: /opt/zimbra/libexec/zmldapinit
done.
Setting replication password...
*** Running as zimbra user: /opt/zimbra/bin/zmldappasswd -l ObbAM5jVo
Updating local config and directory
done.
Setting Postfix password...
*** Running as zimbra user: /opt/zimbra/bin/zmldappasswd -p ObbAM5jVo
Updating local config and directory
done.
Setting amavis password...
*** Running as zimbra user: /opt/zimbra/bin/zmldappasswd -a ObbAM5jVo
:Updating local config and directory
done.
checking isEnabled zimbra-ldap
zimbra-ldap is enabled
checking isEnabled zimbra-store
zimbra-store is enabled
Setting local config zimbra_zmprov_default_to_ldap to FALSE
*** Running as zimbra user: /opt/zimbra/bin/zmlocalconfig -f -e zimbra_zmp
rov_default_to_ldap='FALSE' 2> /dev/null
Deploying CA to /opt/zimbra/conf/ca ...
*** Running as root user: /opt/zimbra/bin/zmcertmgr deployca
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
** Saving CA in ldap...ERROR: service.FAILURE (system failure: getDirectCo
ntext) (cause: javax.naming.AuthenticationException [LDAP: error code 49 -
Invalid Credentials])
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.na
ming.AuthenticationException [LDAP: error code 49 - Invalid Credentials])
done.

checking isEnabled zimbra-store
zimbra-store is enabled
Setting spell check URL...
*** Running as zimbra user: /opt/zimbra/bin/zmprov -l ms mypc.macsonia.loc
al. zimbraSpellCheckURL http://mypc.macsonia.local.:7780/aspell.php
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.na
ming.AuthenticationException [LDAP: error code 49 - Invalid Credentials])
done.
Setting service ports on mypc.macsonia.local....
*** Running as zimbra user: /opt/zimbra/bin/zmprov -l ms mypc.macsonia.loc
al. zimbraImapBindPort 7143 zimbraImapSSLBindPort 7993 zimbraImapProxyBind
Port 143 zimbraImapSSLProxyBindPort 993
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.na
ming.AuthenticationException [LDAP: error code 49 - Invalid Credentials])
*** Running as zimbra user: /opt/zimbra/bin/zmprov -l ms mypc.macsonia.loc
al. zimbraPop3BindPort 7110 zimbraPop3SSLBindPort 7995 zimbraPop3ProxyBind
Port 110 zimbraPop3SSLProxyBindPort 995
:ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.na
ming.AuthenticationException [LDAP: error code 49 - Invalid Credentials])
*** Running as zimbra user: /opt/zimbra/bin/zmprov -l ms mypc.macsonia.loc
al. zimbraPop3BindPort 7110 zimbraPop3SSLBindPort 7995 zimbraPop3ProxyBind
Port 110 zimbraPop3SSLProxyBindPort 995
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.na
ming.AuthenticationException [LDAP: error code 49 - Invalid Credentials])
*** Running as zimbra user: /opt/zimbra/bin/zmprov -l ms mypc.macsonia.loc
al. zimbraMailPort 80 zimbraMailSSLPort 443 zimbraMailMode http
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.na
ming.AuthenticationException [LDAP: error code 49 - Invalid Credentials])
done.
Adding mypc.macsonia.local. to zimbraMailHostPool in default COS...
usage: modifyCos(mc) {name|id} [attr1 value1 [attr2 value2...]]