Cannot getPort - desktop-couchdb.log doesn't exist

Bug #420911 reported by Murat Gunes
4
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
Undecided
Chad Miller
desktopcouch (Ubuntu)
Fix Released
Critical
Stuart Langridge
Karmic
Fix Released
Critical
Stuart Langridge

Bug Description

Binary package hint: desktopcouch

With desktopcouch 0.3-0ubuntu1 and bindwood 0.2~~rev9-0ubuntu1 in Karmic, "dbus-send --session --print-reply --dest=org.desktopcouch.CouchDB / org.desktopcouch.CouchDB.getPort" returns the following output:

Error org.freedesktop.DBus.Python.IOError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/desktopcouch/desktopcouch-service", line 58, in getPort
    return int(desktopcouch.find_port())
  File "/usr/lib/python2.6/dist-packages/desktopcouch/__init__.py", line 87, in find_port
    with open(FILE_LOG, 'r') as log_file:
IOError: [Errno 2] No such file or directory: '/home/murat/.cache/desktop-couch/desktop-couchdb.log'

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Hi Murat, thanks for filing this bug report and helping us make desktopcouch better!

Looks like there is a bug in the port finder. Assigning to you, Stuart, feel free to kick to someone else, or back to me, just don't want it to get lost.

Changed in desktopcouch (Ubuntu):
assignee: nobody → Stuart Langridge (sil)
Changed in desktopcouch (Ubuntu):
importance: Undecided → Critical
milestone: none → karmic-alpha-5
Revision history for this message
Stuart Langridge (sil) wrote :

I *think* this is because desktopcouch is not starting up couchdb correctly, which will be fixed by the larger get-the-port changes. Murat, thanks for the bug report; would you be prepared to try a package from a PPA to see if it fixes your problem? (once this package exists :))

Revision history for this message
Murat Gunes (mgunes) wrote :

Stuart, surely; let me know when it's up.

Revision history for this message
Chad Miller (cmiller) wrote :

This is surely caused by two things: desktopcouch-service does not start couchdb directly (normal), and if couchdb has never been started, then the log file does not exist. Since the get_port code does not expect a log file never to exist, the first call (and all subsequent) to get_port fails.

When we continue using the log-searching code, then we must catch OSErrors and treat them as no port found.

For now, reverting to the /proc searching code.

Changed in desktopcouch:
assignee: nobody → Chad Miller (cmiller)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
desktopcouch (0.3.1-0ubuntu1) karmic; urgency=low

  [Ken VanDine]
  * debian/control
    - Added depends on python-desktopcouch-records. (LP: #422179)
  [Chad Miller]
  * New upstream release.
  * Changed Vcs-Bzr links in control file.
  * Changed version dependency on couchdb.
  * Converting to a full-blown source-package branch.
  * Fix getPort failure. (LP: #420911, LP: #422127)
  * Check couchdb bind-port in replicator. (LP: #419973)
  * Change couchdb bind-port in pairing tool. (LP: #419969)

 -- Chad Miller <email address hidden> Tue, 01 Sep 2009 11:57:25 -0400

Changed in desktopcouch (Ubuntu Karmic):
status: New → Fix Released
Elliot Murphy (statik)
Changed in desktopcouch:
milestone: none → w19-karmic-alpha5
status: New → Fix Released
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.