Dpkg --configure -a Does not fix upgrade bug

Hello,

      After performing and finish an update  the system sent an error with serveral Open-Xchange packages.   The system  promotes the use of dpkg --configure -a  and this was used without any succes.  Any ideas on how to turn around this  error?
root@mail:/# dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
root@mail:/# dpkg --audit
Another process has locked the database for writing, and might currently be
modifying it, some of the following problems might just be due to that.

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 open-xchange-report-client Open-Xchange reporting client
 open-xchange-meta-oxucs The Open-Xchange Meta package for OX into UCS integrat
 open-xchange-drive-client-windows-generic Update data for branded drive client
 open-xchange-drive-client-windows New updater for windows drive clients
 open-xchange-meta-backend-ox6 The Open-Xchange Meta package for OX6 backend pa
 open-xchange-updater-drive The Open-Xchange Updater backend extension for the

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 open-xchange-admin   The Open-Xchange backend administration extension



Hi rriley,

dpkg (the lowlevel package manager on Debian based Linux distributions like Debian, UCS or Ubuntu) complains that someone locked its status database:

dpkg: error: dpkg status database is locked by another process

The cause is most probably another dpkg process that is either still running and stuck or it was killed and the lock was not released.

  1. Check the logs:
    Please have a look at the following log files for progress (is still something going on?) and for obvious errors:

tail -f /var/log/dpkg.log tail -f /var/log/apt/history.log tail -f /var/log/univention/updater.log
“tail” will show the last part of the given file and “-f” outputs appended data as the file grows, so you can see if something is happening.

  1. Try to figure out if there is still a dpkg process running. Execute the following command on the command line:
pgrep dpkg

This should return a number that is the process ID of a running dpkg process. If it doesn’t return anything, there is no dpkg process running right now. In this case you can run the following command to check if any of the higher-level package management processes are still running:

ps auxf | grep -E 'dpkg|-updater|-upgrade| apt'

This should list any process of univention-upgrade, univention-updater, apt or dpkg.

3a. If there are any processes stuck, try to terminate them:

kill <Process ID> killall dpkg

3b. If there are no processes left, remove the lock file. But this should only be the last resort if nothing else works:

rm /var/lib/dpkg/lock

Now try to run dpkg --configure -a again.

Best regards,
Michael

Hallo,

           No process is running but certainly  open-xchange-admin  is half-configured  .  Correct me if I am wrong, On my understanding you only need to configure a package is "new"   .  Reconfigurations are part either of full new release or of a removal of the package.   Here is a tail  of  dpkg.log

============
root@mail:~# tail -30 /var/log/dpkg.log
2016-12-16 12:59:46 configure open-xchange-admin:all 7.8.2-4
2016-12-16 12:59:46 status half-configured open-xchange-admin:all 7.8.2-4
2016-12-16 15:26:01 status triggers-pending initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-16 15:26:02 status triggers-pending ca-certificates:all 20141019.14.201503231550
2016-12-16 15:26:02 startup packages configure
2016-12-16 15:26:02 trigproc initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-16 15:26:02 status half-configured initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-16 15:26:38 configure open-xchange-admin:all 7.8.2-4
2016-12-16 15:26:38 status half-configured open-xchange-admin:all 7.8.2-4
2016-12-16 15:26:39 trigproc ca-certificates:all 20141019.14.201503231550
2016-12-16 15:26:39 status half-configured ca-certificates:all 20141019.14.201503231550
2016-12-16 15:26:45 status installed ca-certificates:all 20141019.14.201503231550
2016-12-16 15:30:39 startup packages configure
2016-12-16 15:31:06 startup packages configure
2016-12-19 09:23:22 startup packages configure
2016-12-19 09:23:22 configure open-xchange-admin:all 7.8.2-4
2016-12-19 09:23:22 status half-configured open-xchange-admin:all 7.8.2-4
2016-12-19 09:23:23 configure initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:23:23 status half-configured initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:23:24 status installed initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:23:24 status triggers-pending initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:23:24 trigproc initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:23:24 status half-configured initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:24:10 status installed initramfs-tools:all 0.115~bpo70+1.35.201410091545
2016-12-19 09:24:21 startup packages configure
2016-12-19 09:24:21 configure open-xchange-admin:all 7.8.2-4
2016-12-19 09:24:21 status half-configured open-xchange-admin:all 7.8.2-4
2016-12-19 10:58:24 startup packages configure
2016-12-19 10:58:24 configure open-xchange-admin:all 7.8.2-4
2016-12-19 10:58:24 status half-configured open-xchange-admin:all 7.8.2-4

=================

          There are no locks    #dpkg --configure -a   still spills same output.

Rolando Riley

Can you tell me the output of:

# univention-run-join-scripts

Here it is


nivention-run-join-scripts
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2016 Univention GmbH, Germany

Running 01univention-ldap-server-init.inst                 skipped (already executed)
Running 02univention-directory-notifier.inst               skipped (already executed)
Running 03univention-directory-listener.inst               skipped (already executed)
Running 04univention-ldap-client.inst                      skipped (already executed)
Running 05univention-bind.inst                             skipped (already executed)
Running 08univention-apache.inst                           skipped (already executed)
Running 10univention-ldap-server.inst                      skipped (already executed)
Running 11univention-heimdal-init.inst                     skipped (already executed)
Running 11univention-pam.inst                              skipped (already executed)
Running 15univention-directory-notifier-post.inst          skipped (already executed)
Running 15univention-heimdal-kdc.inst                      skipped (already executed)
Running 18python-univention-directory-manager.inst         skipped (already executed)
Running 20univention-directory-policy.inst                 skipped (already executed)
Running 20univention-join.inst                             skipped (already executed)
Running 26univention-nagios-common.inst                    skipped (already executed)
Running 28univention-nagios-server.inst                    skipped (already executed)
Running 30univention-appcenter.inst                        skipped (already executed)
Running 30univention-nagios-client.inst                    skipped (already executed)
Running 31univention-nagios-s4-connector.inst              skipped (already executed)
Running 31univention-nagios-samba.inst                     skipped (already executed)
Running 34univention-management-console-server.inst        skipped (already executed)
Running 35univention-management-console-module-appcenter.inskipped (already executed)
Running 35univention-management-console-module-diagnostic.iskipped (already executed)
Running 35univention-management-console-module-ipchange.insskipped (already executed)
Running 35univention-management-console-module-join.inst   skipped (already executed)
Running 35univention-management-console-module-lib.inst    skipped (already executed)
Running 35univention-management-console-module-mrtg.inst   skipped (already executed)
Running 35univention-management-console-module-passwordchanskipped (already executed)
Running 35univention-management-console-module-pkgdb.inst  skipped (already executed)
Running 35univention-management-console-module-quota.inst  skipped (already executed)
Running 35univention-management-console-module-reboot.inst skipped (already executed)
Running 35univention-management-console-module-services.insskipped (already executed)
Running 35univention-management-console-module-setup.inst  skipped (already executed)
Running 35univention-management-console-module-sysinfo.instskipped (already executed)
Running 35univention-management-console-module-top.inst    skipped (already executed)
Running 35univention-management-console-module-ucr.inst    skipped (already executed)
Running 35univention-management-console-module-udm.inst    skipped (already executed)
Running 35univention-management-console-module-updater.instskipped (already executed)
Running 35univention-nagios-cups.inst                      skipped (already executed)
Running 35univention-nagios-dansguardian.inst              skipped (already executed)
Running 35univention-nagios-squid.inst                     skipped (already executed)
Running 36univention-management-console-module-apps.inst   skipped (already executed)
Running 38univention-management-console-module-oxldb.inst  skipped (already executed)
Running 40univention-postgresql.inst                       skipped (already executed)
Running 40univention-virtual-machine-manager-schema.inst   skipped (already executed)
Running 50univention-pkgdb.inst                            skipped (already executed)
Running 66univention-ox-usm-udm.inst                       skipped (already executed)
Running 67univention-mail-server.inst                      skipped (already executed)
Running 78univention-kde.inst                              skipped (already executed)
Running 81univention-mail-cyrus.inst                       skipped (already executed)
Running 81univention-nfs-server.inst                       skipped (already executed)
Running 90univention-bind-post.inst                        skipped (already executed)
Running 91univention-saml.inst                             skipped (already executed)
Running 92univention-management-console-web-server.inst    skipped (already executed)
Running 96univention-samba4.inst                           skipped (already executed)
Running 97univention-s4-connector.inst                     skipped (already executed)
Running 98univention-pkgdb-tools.inst                      skipped (already executed)
Running 98univention-samba4-dns.inst                       skipped (already executed)


Riley

hm… did I understand the right: You do not have a lock-file but dpkg just tells you there is a lock? Can you check again?

ps ax | grep dpkg ( gets the process list using dpkg)

sudo rm /var/lib/dpkg/lock ( removes the lock on dpkg database)

sudo dpkg --configure -a (configure all broken packages)

sudo apt-get update

Halo,
I am going to post what actually solved the problem so others can benefit from the information.

         1)  My system is a 32 bits  UCS install 
         2)  The system interrupted its normal process of upgrade  because of a missing package   (python-ruamel.yaml) .    


          It is not clear to me how on the upgrade process univention-ox got removed   ( Either because it is part of normal upgrade on versions change or because the process was interrupted).  Regardless of the reason, we were able to SOLVE the problem with an updated  version  of python-ruamel.yaml for 32 bits on your repositories and through the sources list.    The following commands were required 
# ucr commit /etc/apt/sources.list.d/*
# apt-get update
# univention-install univention-ox univention-em-client-for-ox fetchmail python-ruamel.yaml


       thank  you for the support

Rolando Riley

Hi,
I know this is an old post, but just wanted to add a cent worth. I did the same as rrley and added “sudo apt-get upgrade.” This worked for me. Upgrade if you need it only. After the CLI upgrade., I’ve did the we upgrade - worked fine without any issues.

Mastodon