Lernid should handle gracefully when Desktop CouchDB does not start up

Bug #516619 reported by Emilien Klein
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Lernid
Fix Released
Medium
Unassigned

Bug Description

As originally reported in [1]:

When you launch Lernid, it will wait for Desktop CouchDB to start up for your user. Apparently it didn't start after 7 "...waiting for couchdb to start...", so Lernid crashed.

Lernid should display some kind of error message and gracefully close, instead of just crashing.

=============
Desktop CouchDB is not running; starting it. Removing stale, deceptive pid file.
Apache CouchDB has started, time to relax.
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...
Traceback (most recent call last):
  File "/usr/bin/lernid", line 414, in <module>
    window = NewLernidWindow()
  File "/usr/bin/lernid", line 393, in NewLernidWindow
    window.finish_initializing(builder)
  File "/usr/bin/lernid", line 92, in finish_initializing
    main_window_size = Preferences.get('main_window_size')
  File "/usr/lib/python2.6/dist-packages/lernid/CouchDBPreferences.py", line 75, in get
    klass = cls.get_instance()
  File "/usr/lib/python2.6/dist-packages/lernid/CouchDBPreferences.py", line 66, in get_instance
    cls._instance = cls()
  File "/usr/lib/python2.6/dist-packages/lernid/CouchDBPreferences.py", line 31, in __init__
    self._database = CouchDatabase(self._db_name, create=True)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server.py", line 50, in __init__
    desktopcouch.find_pid()
  File "/usr/lib/python2.6/dist-packages/desktopcouch/__init__.py", line 29, in find_pid
    pid = start_local_couchdb.start_couchdb()
  File "/usr/lib/python2.6/dist-packages/desktopcouch/start_local_couchdb.py", line 307, in start_couchdb
    write_bookmark_file(username, password, pid)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/start_local_couchdb.py", line 280, in write_bookmark_file
    port = desktopcouch.find_port(pid=pid)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/__init__.py", line 85, in find_port__linux
    raise RuntimeError("Unable to find listening port")
RuntimeError: Unable to find listening port
=============

[1] https://bugs.launchpad.net/lernid/+bug/515890/comments/2

Related branches

Michael Budde (mbudde)
Changed in lernid:
status: New → Triaged
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Thank you very much for filing this bug report. Does this still occur? When it does, does it crash Lernid or simply produce the messages above?

Changed in lernid:
status: Triaged → Incomplete
importance: Undecided → Low
Revision history for this message
John S. Gruber (jsjgruber) wrote :

If this still happens, and if it crashes Lernid, the priority should be raised.

Changed in lernid:
importance: Low → Medium
Revision history for this message
John S. Gruber (jsjgruber) wrote :

The database open (create) is now issued in a try clause to catch these kinds of errors.

Changed in lernid:
status: Incomplete → 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.