fresh install couchdb dumps errors and crash report into log file

Bug #587108 reported by Richard Harding
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
couchdb (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: couchdb

After installing couchdb tailing the couch.log file shows what appear to be crashes or some sort of issue with a supervisor? Things seem to work ok though, but these log messages show up every couple of seconds in blocks and with no activity I'm getting several mb of log file every hour.

[Sat, 29 May 2010 02:56:21 GMT] [error] [<0.63.0>] {error_report,<0.24.0>,
              {<0.63.0>,crash_report,
               [[{initial_call,{mochiweb_socket_server,init,['Argument__1']}},
                 {pid,<0.63.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.2.0>]},
                 {messages,[]},
                 {links,[<0.53.0>]},
                 {dictionary,[]},
                 {trap_exit,true},
                 {status,running},
                 {heap_size,1597},
                 {stack_size,24},
                 {reductions,446}],
                []]}}

[Sat, 29 May 2010 02:56:21 GMT] [error] [<0.53.0>] {error_report,<0.24.0>,
              {<0.53.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}]}]}}

[Sat, 29 May 2010 02:56:21 GMT] [error] [<0.45.0>] {error_report,<0.24.0>,
    {<0.45.0>,supervisor_report,
     [{supervisor,{local,couch_server_sup}},
      {errorContext,start_error},
      {reason,shutdown},
      {offender,
          [{pid,undefined},
           {name,couch_secondary_services},
           {mfa,{couch_server_sup,start_secondary_services,[]}},
           {restart_type,permanent},
           {shutdown,infinity},
           {child_type,supervisor}]}]}}

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

Confirmed on load on Ubuntu Server 10.04 under KVM after hitting this URL:

http://192.168.122.5:5984/_utils/index.html

URL never loads, and couch sits and spins with the above error.

Changed in couchdb (Ubuntu):
status: New → Confirmed
Revision history for this message
Elliot Murphy (statik) wrote :

The error: {error_info,{exit,eaddrinuse,

makes me think there is another couchdb instance already running. Can you tell me more of the story of how you went about setting this up (I just want to be able to think through what could have happened so that things ended up like this)?

I'll also explain some more about CouchDB in Ubuntu just in case it helps with understanding how things fit together, and then maybe some other clues will show up about where the bug is.

In Ubuntu, we use couchdb as part of the standard desktop installation, but don't run a system-wide CouchDB instance on the default port. This is done with the desktopcouch package and python module. If you are looking to write a user application with CouchDB, I recommend looking at quickly, desktopcouch, and slipcover to get some ideas for what is possible - none of this is advertised very well right now but we will be adding a lot of info on it to the new developer manual in 10.10.

If you are looking to write a server application that communicates with a standard CouchDB on the system port, installing the couchdb package should take care of bringing the server up for you, and futon should work ok. The couchdb package actually only contains the init script, all the binaries are in the couchdb-bin package.

CouchDB depends on having a javascript engine available, and it uses libmozjs.so (this is the mozilla spidermonkey js engine). In Ubuntu, this library is only available as part of the xulrunner package, and I've seen some interesting crash situations before where couchdb appeared to load ok, but as soon as you tried to use something like futon it would crash when trying to load a missing libmozjs.so. From the error report you pasted it looks like a port conflict rather than a missing .so, but I'm mentioning it just in case you are working on a server app and start wondering why xulrunner is pulled in when installing couchdb.

Revision history for this message
Richard Harding (rharding) wrote :
Download full text (3.8 KiB)

I'm looking to run couchdb to play with as a potential backend to web applications. I just installed the system-wise daemon:

apt-get install couchdb

If I remove couchdb with --purge the log file is removed so it's the right log file for the service.

After reinstalling couchdb and tailing the log file, I start see those same error messages again.

I can view futon successfully and I managed to create a test db, replicate to another db on the same server, etc. However, after a couple of hours I had a multi-mb log file due to this continuous writing of error messages.

The log entries appear to be every 5s. Attaching a more thorough sample of the log file which is up to 25M after running over night. The log entries appear even though I'm not actively using the server for anything.

Pasting below the result of ps aux | grep couch

couchdb 3644 0.0 0.0 4088 284 pts/9 S May28 0:00 /bin/sh -e /usr/bin/couchdb -a \"/etc/couchdb/default.ini\" -a \"/etc/couchdb/local.ini\" -b -r 5 -p /var/run/couchdb/couchdb.pid -o /dev/null -e /dev/null -R
couchdb 3646 0.0 1.1 118356 23048 pts/9 Sl May28 0:28 /usr/lib/erlang/erts-5.7.4/bin/beam.smp -Bd -K true -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb -- -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/couchdb/local.ini", "/etc/couchdb/default.ini", "/etc couchdb/local.ini"]), receive done -> done end. -pidfile /var/run/couchdb/couchdb.pid -heart
couchdb 3666 0.0 0.0 3856 504 ? Ss May28 0:00 heart -pid 3646 -ht 11
couchdb 6916 0.0 0.0 10704 520 ? Ss May28 0:00 inet_gethost 4
couchdb 6917 0.0 0.0 12804 612 ? S May28 0:00 inet_gethost 4
couchdb 9273 0.0 0.1 83332 2596 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9373 0.0 0.1 148752 2484 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9399 0.0 0.1 83216 2448 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9454 0.0 0.1 83216 2444 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9480 0.0 0.1 148752 2464 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9506 0.0 0.1 83216 2444 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9532 0.0 0.1 83216 2460 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9558 0.0 0.1 83216 2448 ? Ssl May28 0:00 /usr/lib/couchdb/bin/couchjs /usr/share/couchdb/server/main.js
couchdb 9584 0.0 0.1 148752 2472 ? ...

Read more...

Revision history for this message
Richard Harding (rharding) wrote :

Sorry, forgot the log file attachment:

Revision history for this message
Elliot Murphy (statik) wrote :

Thanks for the info. Could you also attach your ini file for couch? It really seems like one couchdb is starting ok and working, and a second couchdb is in a respawn loop and shutting down with an error when it can't bind to the already in use port.

Revision history for this message
Richard Harding (rharding) wrote :

Attaching ini files:

default.ini

Revision history for this message
Richard Harding (rharding) wrote :

Attaching local.ini

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.