package postgresql-9.1 9.1.4-0ubuntu12.04 failed to install/upgrade: /var/log/postgresql/ does not exist

Bug #1048664 reported by mauro1388
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

dk

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: postgresql-9.1 9.1.5-0ubuntu12.04
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Uname: Linux 3.2.0-29-generic-pae i686
ApportVersion: 2.0.1-0ubuntu12
AptOrdering:
 postgresql-9.1: Install
 postgresql-9.1: Configure
 postgresql-contrib-9.1: Configure
Architecture: i386
Date: Mon Sep 10 16:13:20 2012
DpkgHistoryLog:
 Start-Date: 2012-09-10 16:13:03
 Commandline: apt-get -f install
 Upgrade: postgresql-9.1:i386 (9.1.4-0ubuntu12.04, 9.1.5-0ubuntu12.04)
ErrorMessage: il sottoprocesso nuovo script pre-removal ha restituito lo stato di errore 1
SourcePackage: postgresql-9.1
Title: package postgresql-9.1 9.1.4-0ubuntu12.04 failed to install/upgrade: il sottoprocesso nuovo script pre-removal ha restituito lo stato di errore 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
mauro1388 (mauro1388-e) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Error: Could not create log file /var/log/postgresql/postgresql-9.1-main.log
invoke-rc.d: initscript postgresql, action "stop" failed.

It seems you either ran out of disk space, or changed the permissions of /var/log/postgresql ? Please send the output of these commands from a Terminal:

  df -h
  ls -ld /var/log/postgresql

Thanks!

Changed in postgresql-9.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
Eric Mill (konklone) wrote :

Martin - I had the same issue. In my case, the directory /var/log/postgresql was missing. (That is, in /var/log, there were other directories, but not "postgresql").

Creating the directory and chmod'ing it to 777 fixed this issue.

This started happening recently, and seems like a bug in the postgresql-9.1 package - it should either make the directory if it's missing on install, or not care if the directory is missing on uninstall.

Maybe a "mkdir -p" command is all that's needed here?

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks! I'll look into that, this needs to go into pg_ctlcluster.

affects: postgresql-9.1 (Ubuntu) → postgresql-common (Ubuntu)
Changed in postgresql-common (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Incomplete → In Progress
summary: - package postgresql-9.1 9.1.4-0ubuntu12.04 failed to install/upgrade: il
- sottoprocesso nuovo script pre-removal ha restituito lo stato di errore
- 1
+ package postgresql-9.1 9.1.4-0ubuntu12.04 failed to install/upgrade:
+ /var/log/postgresql/ does not exist
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, this does not happen during installation/cluster creation; pg_createcluster creates /var/log/postgresql/ just fine. So what happened here, did you start postgresql, then removed the whole /var/log/postgresql/, and tried to stop it then? (That's a case of "don't do that"...)

Changed in postgresql-common (Ubuntu):
status: In Progress → Incomplete
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
Martin Pitt (pitti) wrote :

Ping?

Revision history for this message
mauro1388 (mauro1388-e) wrote :

so???

non posso più nemmeno aggiornare

grazie

i can't update my ubuntu because of this error

thx

Revision history for this message
mauro1388 (mauro1388-e) wrote :

ok it runs with

 mkdir -p /var/log/postgresql

Revision history for this message
Martin Pitt (pitti) wrote :

Do you remember what you did that /var/log/postgresql/ disappeared?

Revision history for this message
jdvauguet (jd-4) wrote :

As of now (06/06/2013) and

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"

I report this issue as well, fixed by creating the missing repository and chmoding it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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