desktopcouch restart fails a lot on my n900

Bug #505237 reported by Thomas Vander Stichele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Confirmed
Undecided
Ubuntu One Client Engineering team

Bug Description

example:

sbox-FREMANTLE_X86: ~] > run-standalone.sh dbus-send --session --dest=org.desktopcouch.CouchDB --print-reply --type=method_call / org.desktopcouch.CouchDB.getPort
method return sender=:1.71 -> dest=:1.72 reply_serial=2
   int32 54490
[sbox-FREMANTLE_X86: ~] > run-standalone.sh dbus-send --session --dest=org.desktopcouch.CouchDB --print-reply --type=method_call / org.desktopcouch.CouchDB.getPort
method return sender=:1.71 -> dest=:1.73 reply_serial=2
   int32 54490
[sbox-FREMANTLE_X86: ~] > python2.5 /usr/lib/desktopcouch/desktopcouch-stop Apache CouchDB has been killed.
[sbox-FREMANTLE_X86: ~] > run-standalone.sh dbus-send --session --dest=org.desktopcouch.CouchDB --print-reply --type=method_call / org.desktopcouch.CouchDB.getPort
Desktop CouchDB is not running; starting it. Removing stale, deceptive pid file.
Apache CouchDB 0.10.0 (LogLevel=info) is starting.
Failure to start Mochiweb: eaddrinuse
[error] [<0.61.0>] {error_report,<0.22.0>,
              {<0.61.0>,crash_report,
               [[{initial_call,{mochiweb_socket_server,init,['Argument__1']}},
                 {pid,<0.61.0>},
                 {registered_name,[]},
                 {error_info,{exit,eaddrinuse,
                                   [{gen_server,init_it,6},
                                    {proc_lib,init_p_do_apply,3}]}},
                 {ancestors,[couch_secondary_services,couch_server_sup,
                             <0.1.0>]},
                 {messages,[]},
                 {links,[<0.51.0>]},
                 {dictionary,[]},
                 {trap_exit,true},
                 {status,running},
                 {heap_size,1597},
                 {stack_size,24},
                 {reductions,445}],
                []]}}
[error] [<0.51.0>] {error_report,<0.22.0>,
              {<0.51.0>,supervisor_report,
               [{supervisor,{local,couch_secondary_services}},
                {errorContext,start_error},
                {reason,eaddrinuse},
                {offender,[{pid,undefined},
                           {name,httpd},
                           {mfa,{couch_httpd,start_link,[]}},
                           {restart_type,permanent},
                           {shutdown,brutal_kill},
                           {child_type,worker}]}]}}
{"init terminating in do_boot",{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}
...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...
...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...
...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...
...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...
...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...
...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...
...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...
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...
...waiting for couchdb to start...

I'm not sure why I'm getting eaddrinuse. I don't know what config desktopcouchis starting couchdb with; is it reusing the same port number from a previous run ? If so, that might explain, and is probably a mistake - it should be using a new, available port; ports can take a while to close.

As reported in a separate bug, it's pretty terrible that desktopcouch cannot properly wait for couchdb to either start up correctly or not. This is going to cause you guys no end of heisenbugs.

Tags: desktop+
Nicola Larosa (teknico)
Changed in desktopcouch:
assignee: nobody → Ubuntu One Desktop+ team (uone-desktop)
status: New → Confirmed
tags: added: desktop+
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.