Univention Bugzilla – Bug 37417
Failed to start Postgres in postinst -> unconfigured
Last modified: 2015-11-24 12:10:25 CET
A system installed an app that depended on postgres. The configuration of the packages failed. From the logs: ==== update-alternatives: using /usr/share/postgresql/9.1/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode Starting PostgreSQL 9.1 database server: mainError: /var/lib/postgresql/9.1/main is not accessible or does not exist ... failed! failed! invoke-rc.d: initscript postgresql, action "start" failed. dpkg: error processing postgresql-9.1 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of postgresql: postgresql depends on postgresql-9.1; however: Package postgresql-9.1 is not configured yet. dpkg: error processing postgresql (--configure): dependency problems - leaving unconfigured ==== And then some more "leaving unconfigured" problems based on the previous error. Another system worked fine though, /var/lib/postgresql/9.1/main was present. Any ideas what could have gone wrong? From the "broken" system: Filesystem 1K-blocks Used Available Use% Mounted on rootfs 10036860 8697688 806284 92% /
The system was initially installed as UCS 2.4 and upgraded. Postgres may have been installed and removed several times throughout its lifetime.
Snapshot: snap-e277721c Please delete after fixing this bug.
There exists /etc/postgresql/9.1/main/* but no /var/lib/postgresql/9.1/* . The files in /etc seem to come from univention-postgresql. My current hypothesis is that univention-postgresql was updated before postgresql*, thus creating /etc/postgresql/9.1/main/* and the later postgresql-* then skips creating /var/lib/postgresql/9.1/*. Another difference is that "postgresql" is installed instead of just postgresql-*, but this package contains no files of significance. There seems to be no evidence supporting ENOSPC problems except the higher-than-normal (but still far from any limit) disk usage.
We should modify postgresql to not abort the installation when failing to start.
happend several times in Forum and Support cases. It seems to be related to the metapackage "postgresq" which isn't installed normally. I think its a new dependency of bacula-director-pgsql for example (at least seen once). I am not so sure what to check in preup, but it should break and show up a link to sdb.univention.de/1292 (manual migration)
2015072221000236: USI from before and after Forum: http://forum.univention.de/viewtopic.php?f=48&t=4189&p=15481 http://forum.univention.de/viewtopic.php?f=48&t=4190&p=15461
The cause should have been fixed with Bug #39595. *** This bug has been marked as a duplicate of bug 39595 ***
(In reply to Dirk Wiesenthal from comment #2) > Snapshot: snap-e277721c > Please delete after fixing this bug. Done (In reply to Stefan Gohmann from comment #7) > The cause should have been fixed with Bug #39595. > > *** This bug has been marked as a duplicate of bug 39595 *** Indeed