desktopcouch-service crashed with PreconditionFailed in request(): ('file_exists', 'The database could not be created, the file already exists.')

Bug #707321 reported by Peter Cooper on 2011-01-25
This bug affects 152 people
Affects Status Importance Assigned to Milestone
desktopcouch
Critical
Chad Miller
desktopcouch (Ubuntu)
Critical
Chad Miller
Natty
Critical
Chad Miller

Bug Description

Binary package hint: desktopcouch

Trying to sync my existing account. The Gui asked for desktopcouch to be installed which I did. Soon after I had this message.

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: desktopcouch 1.0.5-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
Uname: Linux 2.6.37-12-generic i686
Architecture: i386
Date: Tue Jan 25 09:31:24 2011
ExecutablePath: /usr/lib/desktopcouch/desktopcouch-service
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20101202)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/lib/desktopcouch/desktopcouch-service
ProcEnviron:
 SHELL=/bin/bash
 LC_MESSAGES=en_GB.utf8
 LANGUAGE=en_GB:en
 LANG=en_US.UTF-8
PythonArgs: ['/usr/lib/desktopcouch/desktopcouch-service']
SourcePackage: desktopcouch
Title: desktopcouch-service crashed with PreconditionFailed in request(): ('file_exists', 'The database could not be created, the file already exists.')
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

lp:~cmiller/desktopcouch/preconditionfailed-lp707321
Roberto Alsina (community): Approve on 2011-04-04
Eric Casteleijn (community): Approve on 2011-04-04
Peter Cooper (pcooper-gaitor) wrote :
tags: removed: need-duplicate-check
tags: added: bugpattern-needed
Changed in desktopcouch (Ubuntu):
assignee: nobody → Eric Casteleijn (thisfred)
importance: Undecided → Critical
status: New → Triaged
Changed in desktopcouch (Ubuntu):
assignee: Eric Casteleijn (thisfred) → Chad Miller (cmiller)
Eric Casteleijn (thisfred) wrote :

Chad, I can't really see what's going on here, if you can guide me, I'd be happy to work on this, but I don't know where to start.

It seems that we (potentially) create a database after reconnecting. This seems very wrong to me. (reconnection should not ever have such side effects I think.) The obvious kludge fix of silently trapping the PreconditionFailed exception (on the assumption that the db must already be there then) seems like it wouldn't work, since the code does check for the presence of the db first. It looks like there's a mismatch between what python-couchdb knows, and what the actual state of the couchdb is.

Also I don't understand why the __init__ of Database calls _reconnect, before we have even detected that there is any problem.

I've not been able to reproduce this locally, but as you can see from the number of duplicates, it's hardly a rare problem.

John Lenton (chipaca) on 2011-03-29
visibility: private → public
Allysman (allysman) wrote :

Everytime I restart my computer (sometimes, gnome just stops, and unity still doesn't work on my Intel 945GM) I get this exact error. Maybe it's something just with my laptop but idk

ralph (ralph-shoemaker) wrote :

only failed first time on mine. ok now.

Peter Cooper (pcooper-gaitor) wrote :

as ralph - only failed first time, appears ok now.

Allysman (allysman) wrote :

Well, for me, it only fails on first install, after that it's fine :)

tags: added: iso-testing
Javier González (jvrgzlez) wrote :

Same here it's happen once.

tags: added: bugpattern-written
removed: bugpattern-needed
Changed in desktopcouch (Ubuntu Natty):
milestone: none → ubuntu-11.04-beta-2
Chad Miller (cmiller) on 2011-04-04
Changed in desktopcouch:
status: New → In Progress
assignee: nobody → Chad Miller (cmiller)
importance: Undecided → Critical
Chad Miller (cmiller) on 2011-04-04
Changed in desktopcouch:
status: In Progress → Fix Committed
Chad Miller (cmiller) on 2011-04-04
Changed in desktopcouch (Ubuntu Natty):
status: Triaged → In Progress
Shane Fagan (shanepatrickfagan) wrote :

Fixed in the nightly builds from the ubuntuone ppa.

Chad Miller (cmiller) on 2011-04-08
Changed in desktopcouch:
milestone: none → 1.0.7
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package desktopcouch - 1.0.7-0ubuntu1

---------------
desktopcouch (1.0.7-0ubuntu1) natty; urgency=low

  * New upstream release.
    - [critical] desktopcouch-service crashed with PreconditionFailed in
      request(): ('file_exists', 'The database could not be created, the file
      already exists.') (LP: #707321)
    - 0.6.9b => 1.0.5 API break: desktopcouch.find_port() (LP: #710424)
    - desktopcouch-service crashed with OSError in __init__() (LP: #530322)
    - update_bookmark_file() finds but does not use couchdb.tmpl from alternate
      path (LP: #673641)
    - erlang/desktopcouch/beam.smp don't let the processor go idle (LP: #746367)
    - [low] replication_services/example.py needs update (LP: #599847)
 -- Chad MILLER <email address hidden> Fri, 08 Apr 2011 17:40:53 -0300

Changed in desktopcouch (Ubuntu Natty):
status: In Progress → Fix Released
Rodney Dawes (dobey) on 2011-04-11
Changed in desktopcouch:
status: Fix Committed → Fix Released
joshiss (joshiss) wrote :

I also get this error

Value could not be retrieved. (DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)

Terry Saunders (tsaunders) wrote :

I don't get this error but I tried to install it via the GUI and it says it couldn't install

I had to run sudo apt-get install desktopcouch-ubuntuone to get it working.

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

Duplicates of this bug

Other bug subscribers