Couchdb not starting. — Failure to start Mochiweb: eaddrinuse


I have configure and installed couchdb 1.6.1 on ubuntu 10.04. While configuring and installing it said successfully done. But when I start couchdb it gives me error.

When start first..

Apache CouchDB 1.6.1 (LogLevel=info) is starting.

Apache CouchDB has started. Time to relax.

**[info] [<0.32.0>] Apache CouchDB has started on**

When starting again

 Apache CouchDB 1.6.1 (LogLevel=info) is starting.

 **Failure to start Mochiweb: eaddrinuse**

[error] [<0.127.0>] {error_report,<0.31.0>,
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{application_master,start_it_old,4}]}}}}}},[{couch,start,0},{init,start_it,1},{init,start_em,1}]}}

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

in local.ini I changed
Port to 5983 and also ip to from
Nothing helped

When i run sudo netstat -tulpn

I get following output

tcp 0 0* LISTEN 21688/beam.smp

couchdb -s says Apache CouchDB is not running.

Thanks in advance

Best Solution

If you came here because you recently upgrade you CouchDB 2.0, make sure you updated your local.ini config file. The section for the web server configuration has changed (the name changed from something like httpd to chttpd). Because of that the port directive wasn't being picked up and it was defaulting to 80 which was the same as the web server.

Related Question