package slapd 2.4.31-1+nmu2ubuntu8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

Bug #1304069 reported by Frank Price
94
This bug affects 17 people
Affects Status Importance Assigned to Milestone
openldap (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

During dist-upgrade encountered errors with slapd.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: slapd 2.4.31-1+nmu2ubuntu8
ProcVersionSignature: Ubuntu 3.11.0-18.32-generic 3.11.10.4
Uname: Linux 3.11.0-18-generic x86_64
ApportVersion: 2.14.1-0ubuntu1
Architecture: amd64
Date: Mon Apr 7 11:32:47 2014
DuplicateSignature: package:slapd:2.4.31-1+nmu2ubuntu8:ErrorMessage: subprocess installed post-installation script returned error exit status 1
ErrorMessage: ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2012-08-20 (595 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: openldap
Title: package slapd 2.4.31-1+nmu2ubuntu8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to trusty on 2014-04-07 (0 days ago)

Revision history for this message
Frank Price (fprice) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Ryan Tandy (rtandy) wrote :

The relevant part of the upgrade log:

Setting up slapd (2.4.31-1+nmu2ubuntu8) ...
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.31-1+nmu2ubuntu3... done.
  Moving old database directories to /var/backups:
  - directory dc=ec,dc=oceanit,dc=com... done.
  Loading from /var/backups/slapd-2.4.31-1+nmu2ubuntu3:
  - directory dc=ec,dc=oceanit,dc=com... done.
  - chowning database directory (openldap:openldap)... done
  Directory /var/lib/ldap for dc=example,dc=com not empty, aborting.

Can you provide more details about your configuration? Have you ever edited the files under /etc/ldap/slapd.d by hand?

Changed in openldap (Ubuntu):
status: New → Incomplete
Revision history for this message
rod (e-6od-t) wrote :

same thing occuring to me during 14.04 upgrade from 13.10 + can't send problem report, with the following message :

This problem report is damaged and cannot be processed.

EOFError('Compressed file ended before the end-of-stream marker was reached',)

I'm getting an upgrade log similar to rtandy's and never edited /etc/ldap/slapd.d by hand

Rod

rod (e-6od-t)
Changed in openldap (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Ryan Tandy (rtandy) wrote :

Hi Rod,

Did yours also fail with "Directory /var/lib/ldap for dc=example,dc=com not empty, aborting.", like Frank's did? What's left in /var/lib/ldap after that failed upgrade?

Revision history for this message
rod (e-6od-t) wrote : Re: [Bug 1304069] Re: package slapd 2.4.31-1+nmu2ubuntu8 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

Hi Ryan,

On 28/04/14 05:47, Ryan Tandy wrote:
> Hi Rod,
>
> Did yours also fail with "Directory /var/lib/ldap for dc=example,dc=com
> not empty, aborting."
I don't recall reading this.
> , like Frank's did? What's left in /var/lib/ldap
> after that failed upgrade?
rod@rod-dv6:/var/lib/ldap$ ll
total 680
drwxr-xr-x 2 openldap openldap 4096 Apr 27 01:00 ./
drwxr-xr-x 80 root root 4096 Apr 26 20:39 ../
-rw-r--r-- 1 openldap openldap 2048 Apr 27 01:00 alock
-rw------- 1 openldap openldap 589823 Apr 27 01:30 __db.001
-rw------- 1 openldap openldap 147455 Apr 28 13:44 __db.002
-rw------- 1 openldap openldap 57343 Apr 27 01:00 __db.003
-rw-r--r-- 1 openldap openldap 96 Apr 27 01:00 DB_CONFIG
-rw------- 1 openldap openldap 8192 Apr 27 01:00 dn2id.bdb
-rw------- 1 openldap openldap 32768 Apr 27 01:00 id2entry.bdb
-rw------- 1 openldap openldap 10485759 Apr 27 01:30 log.0000000001
rod@rod-dv6:/var/lib/ldap$

I've attempted a log file edit. It's quite heavy but looks mostly empty...
The only human-readable file seems to be

rod@rod-dv6:/var/lib/ldap$ sudo more DB_CONFIG
set_cachesize 0 2097152 0
set_lk_max_objects 1500
set_lk_max_locks 1500
set_lk_max_lockers 1500
rod@rod-dv6:/var/lib/ldap$

Rod

Revision history for this message
Ryan Tandy (rtandy) wrote :

Hi Rod,

As Frank's upgrade failure was related to the message I quoted, if you didn't see that then chances are you have a different bug. Can you search the log files in /var/log/dist-upgrade for "Setting up slapd" and post the messages after that, like in my quote above? That will tell us which part of the upgrade failed.

Frank, if you're reading this, can you provide any more information about your setup? For example a dump of cn=config (NOTE: contains base64-encoded passwords and maybe other sensitive information) would be very helpful, and a list of which files are still in /var/lib/ldap after the failed upgrade.

Changed in openldap (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
rod (e-6od-t) wrote :
Download full text (9.1 KiB)

On 28/04/14 17:27, Ryan Tandy wrote:
> Hi Rod,
>
> As Frank's upgrade failure was related to the message I quoted, if you
> didn't see that then chances are you have a different bug. Can you
> search the log files in /var/log/dist-upgrade for "Setting up slapd" and
> post the messages after that, like in my quote above? That will tell us
> which part of the upgrade failed.
Hi Ryan, here it is (below). Just warnings pertaining to fonts, it seems.

Rod

copied from apt-term.log:

Setting up slapd (2.4.31-1+nmu2ubuntu3) ...
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 31:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 31:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 31:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 47:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 47:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 47:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 47:
Having multiple <family> in <alias> isn't supported and may not work as
expected
Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 47:
H...

Read more...

Revision history for this message
Ryan Tandy (rtandy) wrote :

Hi Rod,

Not sure about the fontconfig warnings, but I assume they're to do
with your configuration as I don't see such warnings using the default
setup.

As far as openldap:

On Mon, Apr 28, 2014 at 9:21 AM, rod <email address hidden> wrote:
> Setting up slapd (2.4.31-1+nmu2ubuntu3) ...
> Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
> Having multiple <family> in <alias> isn't supported and may not work as
> expected
> [...]
> Backing up /etc/ldap/slapd.d in
> /var/backups/slapd-2.4.31-1ubuntu2.1... done.
> * Starting OpenLDAP slapd [80G [74G[ OK ]

That looks to me like the slapd upgrade succeeded. Do you have any
logs about a slapd upgrade failure? I assume it did fail at some point
as you found your way to this bug...

Revision history for this message
rod (e-6od-t) wrote :

On 28/04/14 18:39, Ryan Tandy wrote:
> Hi Rod,
>
> Not sure about the fontconfig warnings, but I assume they're to do
> with your configuration as I don't see such warnings using the default
> setup.
Thought my settings were default anyway. How can I find out?
> As far as openldap:
>
> On Mon, Apr 28, 2014 at 9:21 AM, rod <email address hidden> wrote:
>> Setting up slapd (2.4.31-1+nmu2ubuntu3) ...
>> Fontconfig warning: "/etc/fonts/conf.d/30-cjk-aliases.conf", line 21:
>> Having multiple <family> in <alias> isn't supported and may not work as
>> expected
>> [...]
>> Backing up /etc/ldap/slapd.d in
>> /var/backups/slapd-2.4.31-1ubuntu2.1... done.
>> * Starting OpenLDAP slapd [80G [74G[ OK ]
> That looks to me like the slapd upgrade succeeded. Do you have any
> logs about a slapd upgrade failure? I assume it did fail at some point
> as you found your way to this bug...
Any way to make sure the upgrade succeeded? I repeatedly did get an
error message + subsequent failure to report.

Anyway, doesn't seem critical so far.

cheers,

Rod

Revision history for this message
Ryan Tandy (rtandy) wrote :

On Mon, Apr 28, 2014 at 10:13 AM, rod <email address hidden> wrote:
> Thought my settings were default anyway. How can I find out?

I'm not sure, but I think debsums might be able to tell you.

> Any way to make sure the upgrade succeeded? I repeatedly did get an
> error message + subsequent failure to report.

Try the upgrade again? Does "apt-get dist-upgrade" complete successfully?

Revision history for this message
rod (e-6od-t) wrote :

Hi Ryan,

in fact this is blocking...
  And quite puzzling.

anytime I get into an update I get this

An error occurred.

The following details are provided:

E: slapd: subprocess installed post-installation script returned error
exit status 1

and this

(synaptic:20833): GLib-CRITICAL **: g_child_watch_add_full: assertion
'pid > 0' failed
Selecting previously unselected package libqgispython2.3.0.
(Reading database ... 498843 files and directories currently installed.)
Preparing to unpack
.../libqgispython2.3.0_2.3.0+git20140428+8120f30~saucy-ubuntugis1_amd64.deb
...
Unpacking libqgispython2.3.0
(2.3.0+git20140428+8120f30~saucy-ubuntugis1) ...
Selecting previously unselected package python-qgis-common.
Preparing to unpack
.../python-qgis-common_2.3.0+git20140428+8120f30~saucy-ubuntugis1_all.deb ...
Unpacking python-qgis-common
(2.3.0+git20140428+8120f30~saucy-ubuntugis1) ...
Setting up slapd (2.4.31-1+nmu2ubuntu8) ...
   Backing up /etc/ldap/slapd.d in
/var/backups/slapd-2.4.31-1+nmu2ubuntu3... done.
   Moving old database directories to /var/backups:

   Backup path
/var/backups/dc=georchestra,dc=org-2.4.31-1+nmu2ubuntu3.ldapdb exists.
Giving up...
dpkg: error processing package slapd (--configure):
  subprocess installed post-installation script returned error exit status 1
Setting up libqgispython2.3.0
(2.3.0+git20140428+8120f30~saucy-ubuntugis1) ...
Setting up python-qgis-common
(2.3.0+git20140428+8120f30~saucy-ubuntugis1) ...
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up slapd (2.4.31-1+nmu2ubuntu8) ...
   Backing up /etc/ldap/slapd.d in
/var/backups/slapd-2.4.31-1+nmu2ubuntu3... done.
   Moving old database directories to /var/backups:

   Backup path
/var/backups/dc=georchestra,dc=org-2.4.31-1+nmu2ubuntu3.ldapdb exists.
Giving up...
dpkg: error processing package slapd (--configure):
  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
  slapd

Rod

On 28/04/14 20:02, Ryan Tandy wrote:
> On Mon, Apr 28, 2014 at 10:13 AM, rod <email address hidden> wrote:
>> Thought my settings were default anyway. How can I find out?
> I'm not sure, but I think debsums might be able to tell you.
>
>> Any way to make sure the upgrade succeeded? I repeatedly did get an
>> error message + subsequent failure to report.
> Try the upgrade again? Does "apt-get dist-upgrade" complete
> successfully?
>

--
Rod Béra, MCF Géomatique / Lecturer, Geomatics
            et SIG pour l'Environnement / and Environmental GIS
Agrocampus-Ouest|65 r.Saint-Brieuc|CS84215|35042 Rennes cedex|France
+33 (0) 223 48 5553 - <email address hidden>

Revision history for this message
Ryan Tandy (rtandy) wrote :

On Mon, Apr 28, 2014 at 1:14 PM, rod <email address hidden> wrote:
> Backup path
> /var/backups/dc=georchestra,dc=org-2.4.31-1+nmu2ubuntu3.ldapdb exists.
> Giving up...

That's a leftover from a previous failed upgrade, when your existing
database was backed up but it failed before restoring it. Better keep
it safe.

I would suggest to move
/var/backups/dc=georchestra,dc=org-2.4.31-1+nmu2ubuntu3.ldapdb
somewhere safe, copy the contents back to /var/lib/ldap (basically
undoing the "moving old database directories" step), and try the
upgrade again. I guess it will fail again, but hopefully in a more
informative way. :)

Revision history for this message
rod (e-6od-t) wrote :

Hi Ryan,

Sorry I missed your email.

Things were blocking and I really had to move forward.
I therefore opted for an fresh install.
Everything went well, obviously.

But this means that we'll probably never know the origin of the problem
I encountered.

You spent some of your time providing me help and trying to figure out
what happened and I am very grateful to you: many thanks!

Best regards,

Rod

On 28/04/14 22:49, Ryan Tandy wrote:
> On Mon, Apr 28, 2014 at 1:14 PM, rod <email address hidden> wrote:
>> Backup path
>> /var/backups/dc=georchestra,dc=org-2.4.31-1+nmu2ubuntu3.ldapdb exists.
>> Giving up...
> That's a leftover from a previous failed upgrade, when your existing
> database was backed up but it failed before restoring it. Better keep
> it safe.
>
> I would suggest to move
> /var/backups/dc=georchestra,dc=org-2.4.31-1+nmu2ubuntu3.ldapdb
> somewhere safe, copy the contents back to /var/lib/ldap (basically
> undoing the "moving old database directories" step), and try the
> upgrade again. I guess it will fail again, but hopefully in a more
> informative way. :)
>

--
Rod Béra, MCF Géomatique / Lecturer, Geomatics
            et SIG pour l'Environnement / and Environmental GIS
Agrocampus-Ouest|65 r.Saint-Brieuc|CS84215|35042 Rennes cedex|France
+33 (0) 223 48 5553 - <email address hidden>

Revision history for this message
Ryan Tandy (rtandy) wrote :

On Tue, Apr 29, 2014 at 7:14 AM, rod <email address hidden> wrote:
> Hi Ryan,
>
> Sorry I missed your email.
>
> Things were blocking and I really had to move forward.
> I therefore opted for an fresh install.
> Everything went well, obviously.
>
> But this means that we'll probably never know the origin of the problem
> I encountered.

Sorry I wasn't able to help you figure it out.

Keeping the bug open and Incomplete while we wait for a response from Frank...

Revision history for this message
Christopher Warner (cwarner) wrote :

Loading the database from the LDIF dump failed with the following
error while running slapadd:
    537a31a0 olcDbDirectory: value #0: invalid path: No such file or directory
    537a31a0 config error processing olcDatabase={2}hdb,cn=config: olcDbDirectory: value #0: invalid path: No such file or directory
    slapadd: bad configuration directory!
dpkg: error processing package slapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 slapd

Revision history for this message
Christopher Warner (cwarner) wrote :

Basically if you've configured ldap already on upgrade from an 13.10 or some other version to 14.04 something is going on with the dumped ldif backup.

Revision history for this message
Ryan Tandy (rtandy) wrote :

Hi Christopher,

The error message you reported:

olcDbDirectory: value #0: invalid path: No such file or directory

is also not the same one this bug is about, and your message doesn't include enough information to tell what caused it. Would you please file a separate bug report about that? Make sure to attach the files from /var/log/dist-upgrade, if apport doesn't include them automatically.

Revision history for this message
Christopher Warner (cwarner) wrote :

Next time I run into it I assumed this is because if there is already a backup and you try to mv to the same exact backup everything comes tumbling down but I'll check it out again and if it is different file under a diff bug

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openldap (Ubuntu) because there has been no activity for 60 days.]

Changed in openldap (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.