After upgrading zimbra LDAP is not starting

Ask questions about your setup or get help installing ZCS server (ZD section below).
victorqedu
Posts: 6
Joined: Tue Mar 29, 2016 7:32 pm

After upgrading zimbra LDAP is not starting

Postby victorqedu » Tue Mar 29, 2016 7:37 pm

I upgraded Zimbra to the latest version and LDAP is not starting.
It seems that zimbra tries to start ldap too many times.
I killed slapd before starting Zimbra but the eror is the same.

In zimbra.log there is this error:

Code: Select all

Mar 29 22:27:49 caido zimbramon[13642]: 13642:info: Starting services initiated by zmcontrol
Mar 29 22:27:49 caido slapd[13696]: @(#) $OpenLDAP: slapd 2.4.39 (Dec  2 2014 21:28:07) $#012#011root@zre-ubuntu14-64:/home/build/p4/zimbra/JUDASPRIEST-860/ThirdParty/openldap/openldap-2.4.39.2z/servers/slapd
Mar 29 22:27:49 caido slapd[13698]: slapd starting
Mar 29 22:27:54 caido slapd[13705]: @(#) $OpenLDAP: slapd 2.4.39 (Dec  2 2014 21:28:07) $#012#011root@zre-ubuntu14-64:/home/build/p4/zimbra/JUDASPRIEST-860/ThirdParty/openldap/openldap-2.4.39.2z/servers/slapd
Mar 29 22:27:54 caido slapd[13705]: daemon: bind(7) failed errno=98 (Address already in use)
Mar 29 22:27:54 caido slapd[13705]: slapd stopped.
Mar 29 22:27:54 caido slapd[13705]: connections_destroy: nothing to destroy.
Mar 29 22:27:59 caido slapd[13712]: @(#) $OpenLDAP: slapd 2.4.39 (Dec  2 2014 21:28:07) $#012#011root@zre-ubuntu14-64:/home/build/p4/zimbra/JUDASPRIEST-860/ThirdParty/openldap/openldap-2.4.39.2z/servers/slapd
Mar 29 22:27:59 caido slapd[13712]: daemon: bind(7) failed errno=98 (Address already in use)
Mar 29 22:27:59 caido slapd[13712]: slapd stopped.


Thank you


User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1655
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Re: After upgrading zimbra LDAP is not starting

Postby quanah » Tue Mar 29, 2016 7:42 pm

Clearly something is listening on the slapd port, regardless of whatever you've killed. You need to track down that process and end it (netstat -an should help).
--
Quanah Gibson-Mount https://github.com/quanah/
Systems Architect, Synacor http://wwwsynacor.com/
A Zetalliance Founder http://www.zetalliance.org/
OpenLDAP Core team http://www.openldap.org/project/
victorqedu
Posts: 6
Joined: Tue Mar 29, 2016 7:32 pm

Re: After upgrading zimbra LDAP is not starting

Postby victorqedu » Tue Mar 29, 2016 8:00 pm

I checked, there is nothing listening on 389 and no process named slapd is running before starting zimbra.
Example:

Code: Select all

root@caido:/etc/init.d# killall -9 slapd
slapd: no process found
root@caido:/etc/init.d# netstat -antpl | grep LISTEN | grep 389
root@caido:/etc/init.d# /etc/init.d/zimbra start
Host caido.ro
        Starting ldap...Done.
Failed.
Failed to start slapd.  Attempting debug start to determine error.
56fadd84 daemon: bind(7) failed errno=98 (Address already in use)
56fadd84 slap_open_listener: failed on ldap://caido.ro:389
root@caido:/etc/init.d# pstree  | grep slapd
     |-slapd---{slapd}
root@caido:/etc/init.d# netstat -antpl | grep LISTEN | grep 389
tcp        0      0 127.0.1.1:389           0.0.0.0:*               LISTEN      20942/slapd
root@caido:/etc/init.d# ps auxww | grep slapd
zimbra   21626  3.0  0.9 48219320 35472 ?      Ssl  22:59   0:00 /opt/zimbra/openldap/sbin/slapd -l LOCAL0 -u zimbra -h ldap://caido.ro:389 ldapi:/// -F /opt/zimbra/data/ldap/config


Zimbra simply launches 2 ldap instances, as the original log shows.
I don't know if this is usefull but right after upgrade, when I tried to start Zimbra I receive an eror - the directory /opt/zimbra/openldap/var/run did not exist and ldap could not start. I created manualy this directory and the new error appeared.

Thank you.
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1655
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Re: After upgrading zimbra LDAP is not starting

Postby quanah » Tue Mar 29, 2016 8:05 pm

Sounds like the permissions may be wrong then, and it can't write out the PID file, so it tries to start another instance.
--
Quanah Gibson-Mount https://github.com/quanah/
Systems Architect, Synacor http://wwwsynacor.com/
A Zetalliance Founder http://www.zetalliance.org/
OpenLDAP Core team http://www.openldap.org/project/
victorqedu
Posts: 6
Joined: Tue Mar 29, 2016 7:32 pm

Re: After upgrading zimbra LDAP is not starting

Postby victorqedu » Tue Mar 29, 2016 8:07 pm

I alreay runned /opt/zimbra/libexec/zmfixperms and the error remained the same.
Can I check or run something manually?
https://wiki.zimbra.com/wiki/Fix_the_Zi ... ermissions
victorqedu
Posts: 6
Joined: Tue Mar 29, 2016 7:32 pm

Re: After upgrading zimbra LDAP is not starting

Postby victorqedu » Tue Mar 29, 2016 8:24 pm

Zimbra writes succesfuly in :/opt/zimbra/openldap-2.4.39.2z/var/run:

Code: Select all

root@caido:/opt/zimbra/openldap-2.4.39.2z/var/run# ls -al
-rw-r----- 1 zimbra zimbra  118 Mar 29 23:19 slapd.args
-rw-r----- 1 zimbra zimbra    6 Mar 29 23:19 slapd.pid


However, ldap status is not returnig the running instance:

Code: Select all

root@caido:/opt/zimbra/openldap-2.4.39.2z# su - zimbra
zimbra@caido:~$ ldap status
zimbra@caido:~$ ps auxww | grep slapd | grep zimbra
zimbra   28403  0.0  0.9 48247996 36044 ?      Ssl  23:19   0:00 /opt/zimbra/openldap/sbin/slapd -l LOCAL0 -u zimbra -h ldap://caido.ro:389 ldapi:/// -F /opt/zimbra/data/ldap/config
zimbra   29244  0.0  0.0   8808   756 pts/3    S+   23:22   0:00 grep slapd
zimbra@caido:~$ ldap status


I think Zimbra is looking for the pid of the ldap service in another directory.
Where could this directory be(in the old versions of zimbra)?
I manualy created the last 2 dirs in /opt/zimbra/openldap-2.4.39.2z/var/run.
victorqedu
Posts: 6
Joined: Tue Mar 29, 2016 7:32 pm

Re: After upgrading zimbra LDAP is not starting

Postby victorqedu » Tue Mar 29, 2016 8:33 pm

This is how I fixed it:

Code: Select all

root@caido:/opt/zimbra/openldap/etc/openldap# ln -s /opt/zimbra/openldap/var/run/slapd.pid /opt/zimbra/data/ldap/state/run/slapd.pid
root@caido:/opt/zimbra/openldap/etc/openldap# ln -s /opt/zimbra/openldap/var/run/slapd.args /opt/zimbra/data/ldap/state/run/slapd.args


I figured this out from the file /opt/zimbra/openldap/etc/openldap/slapd.conf were it was another location for the slapd.pid and slapd.args.
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1655
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Re: After upgrading zimbra LDAP is not starting

Postby quanah » Tue Mar 29, 2016 8:48 pm

It sounds to me like you have a failed upgrade, or you restored a bad configuration. Zimbra does not use slapd.conf.
--
Quanah Gibson-Mount https://github.com/quanah/
Systems Architect, Synacor http://wwwsynacor.com/
A Zetalliance Founder http://www.zetalliance.org/
OpenLDAP Core team http://www.openldap.org/project/
posde
Posts: 2
Joined: Sun Apr 10, 2016 11:36 am

Re: After upgrading zimbra LDAP is not starting

Postby posde » Sun Apr 10, 2016 2:44 pm

I have the exact same phenomena.

More details:

Old version 8.0.7
running on Ubuntu 1204 64bit in a chroot on a dedicated IP address
changing the PID in the script to look in var/run makes slapd start, but other errrors down the road.

Any and all help is greatly appreciated.
Best regards

Peer Oliver Schmidt
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1655
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Re: After upgrading zimbra LDAP is not starting

Postby quanah » Wed Apr 13, 2016 12:43 am

posde wrote:I have the exact same phenomena.

More details:

Old version 8.0.7
running on Ubuntu 1204 64bit in a chroot on a dedicated IP address
changing the PID in the script to look in var/run makes slapd start, but other errrors down the road.

Any and all help is greatly appreciated.


Just to note -- This user had an unsupported setup that blew up on upgrade. They've managed to manually fix things and get it sort of working again.
--
Quanah Gibson-Mount https://github.com/quanah/
Systems Architect, Synacor http://wwwsynacor.com/
A Zetalliance Founder http://www.zetalliance.org/
OpenLDAP Core team http://www.openldap.org/project/

Return to “Installation and Upgrade”

Who is online

Users browsing this forum: No registered users and 22 guests