[karmic] CouchDB crashes on start

Bug #398380 reported by Sense Egbert Hofstede
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
couchdb (Ubuntu)
Fix Released
Undecided
Elliot Murphy

Bug Description

Binary package hint: couchdb

On boot CouchDB isn't started on Karmic. When you try to start it in the console on Karmic it crashes and provides the attached crashdump.

couchdb:
  Installed: 0.9.0-2ubuntu3
  Candidate: 0.9.0-2ubuntu3
  Version table:
 *** 0.9.0-2ubuntu3 0
        500 http://archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

This has nothing to do with bug #389089 since /usr/bin/xulrunner is in place.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :
Revision history for this message
Elliot Murphy (statik) wrote :

I will try to reproduce. I've been working from a local ppa snapshot of couchdb in karmic, preparing a new version to be uploaded, so I hadn't seen these until just today. I've also subscribed to bugs on this package, so we should be able to get things cleaned up for couchdb very soon.

Changed in couchdb (Ubuntu):
assignee: nobody → Elliot Murphy (statik)
Revision history for this message
Elliot Murphy (statik) wrote :

Actually, I see this is probably already fixed. Sense, do you still see this problem with couchdb 0.9.0-2ubuntu5 ?

Changed in couchdb (Ubuntu):
status: New → Incomplete
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

CouchDB is running now, so the problem must be gone.

Elliot Murphy (statik)
Changed in couchdb (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Jamie Bennett (jamiebennett) wrote :

I see this problem with Karmic Alpha 5 and CouchDB 0.10.0a.

Attached crashdump.

Revision history for this message
Kore Nordmann (h-launchpad-kore-nordmann-de) wrote :

For the mentioned error the CouchDB wiki suggests that wrong permissions might lead to this error: http://wiki.apache.org/couchdb/Error_messages#IncorrectPermissions

After doing an `strace -f -e open couchdb` it looks like the directory /var/log/couchdb/0.10.0~svn818859 needs to be created and properly chown'd.

After that mochiweb (the internal httpd) complains that the address is in use, which `netstat -tulpen` claims otherwise. Changing the port in /etc/couchdb/local.ini to something else makes CouchDB run on the changed port, at least as root.

Revision history for this message
Mike Kenney (mfkenney) wrote :

I can confirm that this bug is present in the latest Karmic package. The log and database directories are not being created at installation time and thus the process fails to start.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Everything works fine when desktopcouch is used to start CouchDB.

Revision history for this message
Gareth Jones (garethj) wrote :

I can confirm this problem with the latest Karmic package and that creating /var/log/couchdb/0.10.0/ with global read/write/execute permissions works as a temporary fix to the problem.

Changed in couchdb (Ubuntu):
status: Fix Released → New
Revision history for this message
Chad Miller (cmiller) wrote :

Gareth Jones, you want bug #453049 instead.

Changed in couchdb (Ubuntu):
status: New → Fix Released
Revision history for this message
Nicklas W Bjurman (lordmetroid) wrote :

I can not get it started, on jaunty I simply did sudo couchdb but using sudo couchdb on Karmic, erlang reports:
{"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}]}}

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

Nicklas, what version? What does the log file say? Can you "sudo strace -f -e trace=file -o couchdb.trace couchdb" and attach the resulting couchdb.trace file?

Revision history for this message
Nicklas W Bjurman (lordmetroid) wrote :

Ahh me and CardinalFang on #CouchDB@Freenode figured it out. Seems like there is a need for another patch including mkdir -p /var/log/couchdb/0.10.0; chown couchdb:couchdb /var/log/couchdb/0.10.0

I believe CardinalFang may be working on it, though I would sure want to know how to create such a patch myself so I can contribute more productively to projects in the future.

Revision history for this message
Danny Howard (dannyman) wrote :

Hello,

I can't start couchdb via:
sudo /etc/init.d/couchdb start

And until doing the fix described by Nilas, simply running couchdb crashed. Now I can start couchdb with:

sudo couchdb

Alas, /etc/init.d/couchdb is still broken:

0-21:53 djh@noneedto ~$ sudo /etc/init.d/couchdb start
 * Starting database server couchdb [ OK ]

(Doesn't actually answer on http://127.0.0.1:5984/ )

0-21:53 djh@noneedto ~$ sudo /etc/init.d/couchdb stop
 * Stopping database server couchdb [ OK ]
0-21:53 djh@noneedto ~$ ps auxww | grep couch
couchdb 5611 0.0 0.0 1748 580 pts/1 S 21:53 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 5815 0.0 0.0 4032 636 pts/1 S 21:53 0:00 sleep 5
djh 5844 0.0 0.0 4116 800 pts/1 S+ 21:54 0:00 grep couch
0-21:54 djh@noneedto ~$ sudo killall couchdb

So . . . it would be neat if the init.d worked. :)

Revision history for this message
Mike Kenney (mfkenney) wrote :

Danny Howard, you need to insure that the directories /var/lib/couchdb/$vers and /var/log/couchdb/$vers exist and are owned by the user:group couchdb:couchdb ($vers is the package version, currently 0.10.0). The directory permissions should be set to 0770.

Once the directories are created, kill the existing process (sudo killall couchdb) and restart (sudo service couchdb start).

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.