Hi Dude. Some time ago I was doing a fresh installation of zimbra on a cloud provider, suddenly I arrived at “Initializing ldap … Failed” the installation process stopped. This is the problem I faced while installing zimbra on a cloud platform. Zimbra error LDAP when running install and can’t continue. There is error “Connection refused at /opt/zimbra/libexec/zmldapinit”.
I created an instance with the following specs:
- CPU: 2 cores.
- RAM: 4GB
- Storage: 40GB disks.
- OS: Ubuntu 18.
Like Cloud platforms in general (eg GCP, AWS) in instances there are only Local IPs. External Public IP embedded in “VPC Network” feature.
Troubleshoot.
At first I suspected that the LDAP version in my ubuntu repository was outdated. Because in the installation log like this.
Mon Apr 3 14:48:36 2023 zimbra-ldap is enabled
Mon Apr 3 14:48:36 2023 Initializing ldap...
Mon Apr 3 14:48:36 2023 *** Running as zimbra user: /opt/zimbra/libexec/zmldapinit
Connection refused at /opt/zimbra/libexec/zmldapinit line 138.
Mon Apr 3 14:49:24 2023 failed.
And also in /var/log/zimbra.log show like this.
Apr 3 14:48:53 mail slapd[58073]: @(#) $OpenLDAP: slapd 2.4.59 (Jul 7 2021 22:26:24) $#012#011openldap
Apr 3 14:48:53 mail slapd[58073]: daemon: bind(7) failed errno=99 (Cannot assign requested address)
Apr 3 14:48:53 mail slapd[58073]: slapd stopped.
Fix the Problem.
After googling and read some threat in zimbra forum, i found this link.
Big problem is I forgot not to add local IP in /etc/hosts.
Here is /etc/hosts before:
#cat /etc/hosts
127.0.0.1 localhost
103.117.57.220 mail.habibza.in mail
This case solved with add local IP in /etc/hosts. Like here.
# cat /etc/hosts
127.0.0.1 localhost
103.117.57.220 mail.habibza.in mail
10.13.20.145 mail.habibza.in mail
After save and then continue re-run with command “/opt/zimbra/libexec/zmsetup.pl
“. Installation success until finish.
That is simply way to fix zimbra error LDAP when running install. Please feel free for comment. Maybe usefull.