CouchDB crashes at startup: {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal

Bug #1262220 reported by Hendy Irawan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
couchdb (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

sudo service couchdb stop/restart/start is "silent" about it. (it starts "normally", respawned several times but then is killed)

The killing is visible in dmesg:

[ 2107.500012] init: couchdb main process (11934) terminated with status 1
[ 2107.500061] init: couchdb main process ended, respawning
[ 2107.829258] init: couchdb main process (11976) terminated with status 1
[ 2107.829338] init: couchdb main process ended, respawning
[ 2108.162798] init: couchdb main process (12017) terminated with status 1
[ 2108.162871] init: couchdb main process ended, respawning
[ 2108.522668] init: couchdb main process (12058) terminated with status 1
[ 2108.522710] init: couchdb main process ended, respawning
[ 2108.834284] init: couchdb main process (12098) terminated with status 1
[ 2108.834304] init: couchdb main process ended, respawning
[ 2109.173867] init: couchdb main process (12138) terminated with status 1
[ 2109.173931] init: couchdb main process ended, respawning
[ 2109.534902] init: couchdb main process (12181) terminated with status 1
[ 2109.534928] init: couchdb main process ended, respawning
[ 2109.875314] init: couchdb main process (12221) terminated with status 1
[ 2109.875339] init: couchdb main process ended, respawning
[ 2110.200497] init: couchdb main process (12263) terminated with status 1
[ 2110.200518] init: couchdb main process ended, respawning
[ 2110.514901] init: couchdb main process (12305) terminated with status 1
[ 2110.514924] init: couchdb main process ended, respawning
[ 2110.870927] init: couchdb main process (12346) terminated with status 1
[ 2110.870964] init: couchdb respawning too fast, stopped

Running in Terminal using couchdb user gives this message:

couchdb@hendy:~ > couchdb
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/etc/couchdb/default.ini","/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{error,enoent}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,56}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,269}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: couchdb 1.4.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-14.21-generic 3.11.7
Uname: Linux 3.11.0-14-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
Date: Wed Dec 18 09:33:47 2013
InstallationDate: Installed on 2013-12-18 (0 days ago)
InstallationMedia: Linux Mint 16 "petra" - Release amd64 20131205
MarkForUpload: True
PackageArchitecture: all
SourcePackage: couchdb
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.couchdb.local.ini: [inaccessible: [Errno 13] Permission denied: '/etc/couchdb/local.ini']
---
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
DistroRelease: Ubuntu 13.10
InstallationDate: Installed on 2013-12-18 (0 days ago)
InstallationMedia: Linux Mint 16 "petra" - Release amd64 20131205
MarkForUpload: True
Package: couchdb 1.4.0-0ubuntu1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 3.11.0-14.21-generic 3.11.7
Tags: petra third-party-packages
Uname: Linux 3.11.0-14-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Hendy Irawan (ceefour) wrote :
tags: added: saucy
tags: added: apport-collected
description: updated
Revision history for this message
Hendy Irawan (ceefour) wrote : Dependencies.txt

apport information

Revision history for this message
Hendy Irawan (ceefour) wrote : ProcEnviron.txt

apport information

Revision history for this message
Hendy Irawan (ceefour) wrote :

I thought it was bug #1212481 but was different.

Revision history for this message
Hendy Irawan (ceefour) wrote :

Spoke too soon, I previously only purged 'couchdb' package.

After *actually* purging couchdb*, by purging 3 packages: couchdb, couchdb-bin, couchdb-common, then reinstalling, I'm able to make this work. yay! :)

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Hendy,

Thanks for reporting this! I'm not that familiar with Linux Mint, but it uses it's own repositories, correct? So Mint wont necessarily be in sync with the versions of everything in Ubuntu 13.10? If this is the case, a package built for Ubuntu might not work on Mint without being rebuilt. The Erlang C extensions need to be built against a specific Erlang version, etc.

Anyway, in terms of a complete purge fixing things... was the problem that the upgrade from CouchDB 1.2.0 didn't work correctly? What CouchDB version were you using previously?

Revision history for this message
Hendy Irawan (ceefour) wrote :

For some packages in main, yes Linux Mint maintains their own. But not universe :

ceefour@hendy:~ > aptitude show couchdb
Package: couchdb
State: installed
Automatically installed: no
Version: 1.4.0-0ubuntu1
Priority: optional
Section: universe/misc
Maintainer: Ubuntu Developers <email address hidden>
Architecture: all
Uncompressed Size: 96.3 k
Depends: couchdb-bin (>= 1.4.0-0ubuntu1), adduser, upstart, sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16)
Replaces: couchdb-bin (<= 1.0.1-0ubuntu18), couchdb-bin (<= 1.0.1-0ubuntu18)
Description: RESTful document oriented database - system-wide instance
 Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API. Among other
 features, it provides robust, incremental replication with bi-directional conflict detection and resolution, and is queryable and indexable using a
 table-oriented view engine with JavaScript acting as the default view definition language.

 CouchDB is written in Erlang, but can be easily accessed from any environment that provides means to make HTTP requests. There are a multitude of
 third-party client libraries that make this even easier for a variety of programming languages and environments.

 This package adds the Upstart job and other items needed for a system-wide CouchDB instance that is started at boot.
Homepage: http://couchdb.apache.org/

This was what happened:

1. I installed CouchDB 1.4.0 on Mint 16 (Ubuntu 13.10)
2. I replaced the /etc/couchdb and /var/lib/couchdb from my CouchDB 1.2 files (from Ubuntu 13.04)
3. CouchDB 1.4.0 won't start
4. I purged "couchdb" (only), then deleted /etc/couchdb and /var/lib/couchdb
5. I reinstalled "couchdb"
6. CouchDB 1.4.0 still won't start
7. I purged "couchdb", couchdb-common, and couchdb-bin
8. I reinstalled "couchdb"
9. CouchDB 1.4.0 now starts

As this is a development machine, I didn't bother trying to restore my CouchDB 1.2 data files anyway since by then I was already tired of dealing with this. ;-)

Changed in couchdb (Ubuntu):
status: New → Invalid
Revision history for this message
Hendy Irawan (ceefour) wrote :

As this isn't a bug (I don't (yet?) have a need for upgrading from 1.2) I've marked this bug as Invalid.

Although my opinion is, CouchDB currently has one of the most confusing error messages compared to the rest of database apps...

Revision history for this message
Kevin Wallace (kwallace) wrote :

I got this error after switch /bin/sh to point to /bin/bash instead of /bin/dash. Switching sh back to dash immediately solved problem. fwiw, additional couch process messages can be found in /var/log/upstart/couchdb.log, which helped me to realize what might be causing the problem.

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.