package openerp-server failed to remove: subprocess installed post-removal script returned error exit status 1 - userdel: user openerp is currently logged in

Bug #454436 reported by Darkmike
260
This bug affects 43 people
Affects Status Importance Assigned to Milestone
openerp-server (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: openerp-server

root@michael-laptop:/opt/ofbiz-trunk# aptitude remove openerp-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REMOVED:
  openerp-server postgresql{u} postgresql-8.4{u} postgresql-common{u} python-libxslt1{u} python-lxml{u} python-psycopg2{u} python-pychart{u} python-renderpm{u}
  python-reportlab{u} python-reportlab-accel{u}
0 packages upgraded, 0 newly installed, 11 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 103MB will be freed.
Do you want to continue? [Y/n/?] yt^?
Writing extended state information... Done
(Reading database ... 262517 files and directories currently installed.)
Removing openerp-server ...
Stopping openerp-server: start-stop-daemon: warning: failed to kill 21092: No such process
openerp-server.
userdel: user openerp is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel openerp' returned error code 8. Exiting.
dpkg: error processing openerp-server (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing postgresql ...
Removing postgresql-8.4 ...
 * Stopping PostgreSQL 8.4 database server [ OK ]
Removing postgresql-common ...
Removing python-libxslt1 ...
Removing python-lxml ...
Removing python-psycopg2 ...
Removing python-pychart ...
Removing python-renderpm ...
Removing python-reportlab-accel ...
Removing python-reportlab ...
Processing triggers for sreadahead ...
Processing triggers for man-db ...
Processing triggers for python-support ...
Errors were encountered while processing:
 openerp-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done

Current status: 1 broken [+1].

ProblemType: Package
Architecture: amd64
Date: Sun Oct 18 01:52:59 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-removal script returned error exit status 1
NonfreeKernelModules: nvidia
Package: openerp-server 5.0.5-1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
SourcePackage: openerp-server
Title: package openerp-server 5.0.5-1 failed to install/upgrade: subprocess installed post-removal script returned error exit status 1
Uname: Linux 2.6.31-12-generic x86_64

Revision history for this message
Darkmike (mikefaille) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.
Confirmed by duplicate reports.

summary: package openerp-server 5.0.5-1 failed to install/upgrade: subprocess
- installed post-removal script returned error exit status 1
+ installed post-removal script returned error exit status 1 - userdel:
+ user openerp is currently logged in
summary: - package openerp-server 5.0.5-1 failed to install/upgrade: subprocess
- installed post-removal script returned error exit status 1 - userdel:
- user openerp is currently logged in
+ package openerp-server failed to remove: subprocess installed post-
+ removal script returned error exit status 1 - userdel: user openerp is
+ currently logged in
Changed in openerp-server (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
tags: added: lucid
Revision history for this message
Chris B (billington-chris) wrote :

package can be removed after a
sudo service openerp-server stop

Lucid RC

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

"package can be removed after a
sudo service openerp-server stop

Lucid RC"

I can't confirm this on Lucid 32 bit

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

after upgrading to openerp5.0.6 and a reboot I can uninstall it properly :-)

Revision history for this message
Miguel Tadeu (mtadeunet) wrote :

I also confirm that stopping the service doesn't solve the problem. Still can't remove openerp because the user seems logged in.

Revision history for this message
Kaustav Das Modak (kaustav-dasmodak) wrote :

As noted by Miguel Tadeu, the openerp user has to be logged out first, otherwise dpkg will keep throwing errors.
So to uninstall openerp-server on my Ubuntu 10.10 32bit desktop, I ran :
$ sudo skill -kill -u openerp

and then I was able to remove openerp-server using:
$ sudo apt-get remove openerp-server

For details, see "man skill" or http://www.cyberciti.biz/tips/howto-linux-kill-and-logout-users.html

P.S. I did not need to stop the openerp-server service manually, apt-get took care of it during the removal process. However, if you need to stop the openerp-server process, you can do so manually using be4truth's instructions above.

Revision history for this message
Daniel Hahler (blueyed) wrote :

This means that the process was still running when the script tried to remove the user.

http://wiki.debian.org/AccountHandlingInMaintainerScripts discusses if a system user should get deleted after all.

Anyway, the server process should have been stopped regardless on uninstall.

See bug #387945 about this issue in couchdb.

Changed in openerp-server (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openerp-server - 5.0.15-2ubuntu1

---------------
openerp-server (5.0.15-2ubuntu1) precise; urgency=low

  * Fix creation of openerp user, when a user openerp* already exists.
    - debian/openerp-server.postinst
    - LP: #807017
  * Fix multiple starts of the server, by using "startas" and "oknodo" with
    start-stop-daemon.
    - debian/openerp-server.init
    - LP: #414864
    - This should also fix "userdel: user openerp is currently logged in"
      (LP: #454436).
 -- Daniel Hahler <email address hidden> Sat, 22 Oct 2011 21:03:11 +0200

Changed in openerp-server (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

Here is the used patch for reference (relevant for any StableReleaseUpdate):
http://launchpadlibrarian.net/83458989/openerp-server_5.0.15-2_5.0.15-2ubuntu1.diff.gz

no longer affects: openerp-server (Ubuntu Hardy)
no longer affects: openerp-server (Ubuntu Lucid)
no longer affects: openerp-server (Ubuntu Maverick)
no longer affects: openerp-server (Ubuntu Natty)
no longer affects: openerp-server (Ubuntu Oneiric)
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.