first startup failed

Bug #486665 reported by Thomas Vander Stichele
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
desktopcouch
Confirmed
Critical
Chad Miller

Bug Description

I'm trying to use desktopcouch 0.5 on Fedora 11.

I got this after creating an rpm and installing:

[thomas@otto desktopcouch-0.5]$ desktopcouch-pair
/usr/lib/python2.6/site-packages/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/lib/python2.6/site-packages/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
Apache CouchDB has started, time to relax.
Desktop CouchDB is not running; starting it. ...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/desktopcouch-pair", line 907, in <module>
    desktopcouch_port = desktopcouch.find_port()
  File "/usr/lib/python2.6/site-packages/desktopcouch/__init__.py", line 40, in find_port__linux
    pid = find_pid()
  File "/usr/lib/python2.6/site-packages/desktopcouch/__init__.py", line 29, in find_pid
    pid = start_local_couchdb.start_couchdb()
  File "/usr/lib/python2.6/site-packages/desktopcouch/start_local_couchdb.py", line 307, in start_couchdb
    write_bookmark_file(username, password, pid)
  File "/usr/lib/python2.6/site-packages/desktopcouch/start_local_couchdb.py", line 280, in write_bookmark_file
    port = desktopcouch.find_port(pid=pid)
  File "/usr/lib/python2.6/site-packages/desktopcouch/__init__.py", line 85, in find_port__linux
    raise RuntimeError("Unable to find listening port")
RuntimeError: Unable to find listening port

I also ran this:

[thomas@otto desktopcouch-0.5]$ ps auxw | grep couch
thomas 13359 0.1 0.1 12700 5532 pts/9 S+ 14:24 0:00 vim desktopcouch.otl
thomas 13660 0.0 0.0 4868 1212 pts/1 S 14:25 0:00 /bin/sh -e /usr/bin/couchdb -n -a \"/etc/couchdb/default.ini\" -a \"/etc/xdg/desktop-couch/compulsory-auth.ini\" -a \"/home/thomas/.config/desktop-couch/desktop-couchdb.ini\" -b -r 0 -p /home/thomas/.cache/desktop-couch/desktop-couchdb.pid -o /home/thomas/.cache/desktop-couch/desktop-couchdb.stdout -e /home/thomas/.cache/desktop-couch/desktop-couchdb.stderr -R
thomas 13701 0.0 0.0 4868 668 pts/1 S 14:25 0:00 /bin/sh -e /usr/bin/couchdb -n -a \"/etc/couchdb/default.ini\" -a \"/etc/xdg/desktop-couch/compulsory-auth.ini\" -a \"/home/thomas/.config/desktop-couch/desktop-couchdb.ini\" -b -r 0 -p /home/thomas/.cache/desktop-couch/desktop-couchdb.pid -o /home/thomas/.cache/desktop-couch/desktop-couchdb.stdout -e /home/thomas/.cache/desktop-couch/desktop-couchdb.stderr -R
thomas 13702 2.9 0.2 74784 8420 pts/1 Sl 14:25 0:00 /usr/lib/erlang/erts-5.6.5/bin/beam.smp -Bd -K true -- -root /usr/lib/erlang -progname erl -- -home /home/thomas -noshell -noinput -smp auto -sasl errlog_type error -pa /usr/lib/couchdb/erlang/lib/couch-0.10.0/ebin /usr/lib/couchdb/erlang/lib/mochiweb-r97/ebin /usr/lib/couchdb/erlang/lib/ibrowse-1.5.2/ebin /usr/lib/couchdb/erlang/lib/erlang-oauth/ebin -eval application:load(ibrowse) -eval application:load(oauth) -eval application:load(crypto) -eval application:load(couch) -eval crypto:start() -eval ssl:start() -eval ibrowse:start() -eval couch_server:start([ "/etc/couchdb/default.ini", "/etc/xdg/desktop-couch/compulsory-auth.ini", "/home/thomas/.config/desktop-couch/desktop-couchdb.ini"]), receive done -> done end. -pidfile /home/thomas/.cache/desktop-couch/desktop-couchdb.pid -heart
thomas 13717 0.0 0.0 4200 724 pts/1 S+ 14:26 0:00 grep couch

After that I ran the same command again, and it worked:

[thomas@otto desktopcouch-0.5]$ desktopcouch-pair
/usr/lib/python2.6/site-packages/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/lib/python2.6/site-packages/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
2009-11-22 14:26:08,807 [13719] root:DEBUG: starting couchdb pairing tool
2009-11-22 14:26:08,896 [13719] root:INFO: This machine hasn't authorized itself to Ubuntu One; replication to the cloud isn't possible until it has. See 'ubuntuone-client-applet'.
2009-11-22 14:26:28,313 [13719] Listening:INFO: want to listen for invitations.
2009-11-22 14:26:28,449 [13719] root:DEBUG: found 0 self_identity records
2009-11-22 14:26:28,493 [13719] root:DEBUG: set new self-identity value: '4cf6b299-1318-4f4b-baa8-67e0c25c63dc'
2009-11-22 14:26:28,494 [13719] ListenForInvitations:INFO: local port to receive invitations is 55716
2009-11-22 14:26:28,521 [13719] PairAdvertisement:INFO: starting advertising _couchdb_pairing_invitations._tcp on port 55716
2009-11-22 14:26:39,701 [13719] PairAdvertisement:INFO: ending advertising _couchdb_pairing_invitations._tcp on port 55716
2009-11-22 14:26:50,799 [13719] root:DEBUG: found 1 self_identity records
2009-11-22 14:26:50,800 [13719] root:DEBUG: paired back-connecting machine count is 0
2009-11-22 14:26:50,800 [13719] root:DEBUG: exiting couchdb pairing tool

Because of the previous failure, it did not generate a couchdb.html file. Took a while to figure that out. I killed it with
/usr/lib/desktopcouch/desktopcouch-stop

but the desktopcouch-service script didn't shutdown, and its child couchdb process was in Z state.

killing the -service script cleaned up properly.

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

I think this is a timing error, which we have recently fixed.

We assume that having a PID file also means we have a valid port number. That isn't always the case. On some machines, we lose the race and get this error.

Changed in desktopcouch:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Chad Miller (cmiller)
Revision history for this message
Lurchman (k-launchpad-loowis-durge-org) wrote :

I'm trying to follow the "quickly tutorial" in a recently-upgraded-from-Jaunty install of Karmic, and I'm getting the same error.
(i.e. first run fails, but second run works)

At least I know now why the couchdb.html isn't working!

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.